Plugs stay on all the time, the binary sensor just works out if it's on or off
Spent the evening cleaning up all my config files, moved a ton of stuff over to the secrets file. Got the Dyson fan integration configured also.
What have you moved over to the secrets file? Anything other than usernames/passwords/API keys?
I got your template sensor working, but it's messed up some other integration sensors i had.
I'm not sure if i need to put them in other places of the config file, or if they need to be nested under a single sensor.
This is how it looks at the moment:
		Code:
	
	# kWh Conversion, name = sensor.energy_spent #
sensor:
  - platform: integration
    source: sensor.smart_plug_2_mss310_power_sensor_w_0
    name: energy_spent
    unit_prefix: k
    round: 2
  - platform: integration
    source: sensor.outdoor_tree_lights_mss310_power_sensor_w_0
    name: office_energy_used
    unit_prefix: k
    round: 2
# Smart Plug 1#
sensor:
  - platform: template
    sensors:
      smartplug1:
        value_template: >
          {{ state_attr("switch.smart_plug_1", "current_power_w") | replace(" W", "") | float("Unavailable") }}
        unit_of_measurement: Watt
        friendly_name: Plug1 usageIf i remove everything to do with "smart plug 1" then my old kWh conversion sensors work.
I haven't yet tried, but wondering if this would work:
		Code:
	
	sensor:
  - platform: integration
    <required arguments>
  - platform: integration
    <required arguments>
  - platform: template
    <required arguments> 
	 
  
 
		
 
 
		 
 
		
