@RoRoo wrote:
I’ve been trying to automate the smartplug in my bedroom to switch off when it isn’t used in the evening.
The conditions are:
Lights in the living room (lights.woonkamer_verlichting) are off.
The smartplug in the living room is off (switch.tv_meubel)
It’s later than 10 pm and earlier than 6 am.It triggers when the usage of the switch.slaapkamer is below 6W and higher than 1W. This should prevent it from switching off when the Missus is watching Netflix in the bedroom. Thus keeping the WAF intact
I’m using the following automation:
- id: slaapkamer_plug_auto_off initial_state: 'on' alias: Slaapkamer Plug Auto Off trigger: platform: numeric_state entity_id: sensor.slaapkamer_watts below: 6 above: 1 for: minutes: 1 condition: condition: and conditions: - condition: time after: '22:00' before: 06:00 - condition: state entity_id: light.woonkamer_verlichting state: 'off' - condition: state entity_id: switch.tv_meubel state: 'off' action: - service: switch.turn_off entity_id: switch.slaapkamer
The only thing I can think of why it isn’t triggering, is that the W usage of my switch is fluctuating…
But I’ve tested it by using other conditions (light.toilet off and switch.daughter off) and then it works.I’ve checked if the states of the switch and lights group are correct, and they are off so it should meet the conditions…
Posts: 2
Participants: 2