@Crumpy10 wrote:
Hey Everyone,
I am a little stuck on a timer for my hallway. I have a 2 way lighting circuit that works fine in HA and a timer that turns off the light after 2 mins, that also works fine. What I can not figure out is how to restart the timer if movement is detected by a PIR ‘On’.
Here is my automation-:#Hallway Timer - alias: Turn off hallway light 2 minutes after last movement trigger: platform: state entity_id: binary_sensor.hall_lights, binary_sensor.hall_pir to: 'on' for: minutes: 2 action: service: input_boolean.turn_off entity_id: input_boolean.2way_toggle5
The binary_sensor.hall_lights is a current sensor that actually tells me when the light is physically ‘On’ and the other binary sensor is the PIR.
Am I correct in saying that if the PIR sensor goes to ‘On’ it will restart the 2 min timer?Just for info, I am using the input_boolean as a virtual switch for the 2 way lighting.
What am I doing wrong?
Cheers
Simon
Posts: 9
Participants: 3