Hello. Here is my simple automation which turn on light and off 2 min after movement.
- id: Turn on Garage light when there is movement
alias: Turn on Garage light when there is movement
trigger:
- platform: state
entity_id: binary_sensor.garaz_motion
to: 'on'
condition: []
action:
- service: light.turn_on
entity_id: light.garaz_swiatlo
mode: single
- id: Turn off Garage light 2 minutes after last movement
alias: Turn off Garage light 2 minutes after last movement
trigger:
- platform: state
entity_id: binary_sensor.garaz_motion
to: 'off'
for: 0:2:00
condition: []
action:
- service: light.turn_off
entity_id: light.garaz_swiatlo
mode: single
Everything works until I manually turn off light. I still need to wait 2 minutes to turn light automaticly.
In othe words:
- I open the doors and light turns on
- I close the doors wait 2 min and light turns off
then - I open the doors and light turns on
- I press button to turn off light
- I am still in garage and moving and light doesn’t turn on
- After 2 minutes light turns on
2 posts - 2 participants