I’m trying to do what is probably a basic thing, but I’m still fairly new to HA.
I’m wanting to work it so that when I open the door after sunset, it will turn on my outdoor lights and then do the opposite when I re-enter the house. That’s simple. But I’m trying to get it to work practically.
Firstly, after opening the screen door, I’m going to close it immediately to prevent bugs coming in, but I obviously don’t want to then have my lights switch back off. So my first thought was to have a timeout feature that prevents the closing of the door firing the automation to switch the lights back off.
My thought is to have this ‘time-out’ to be, say, 30 seconds. Plenty of time for me to open the door, perhaps put my shoes on and then close the screen door without the lights switching off.
Could somebody point me to an example of the YAML for this? This is what I have so far without any ‘timeout’ feature:
- id: '1555374209260' alias: Front Door Open trigger: - entity_id: binary_sensor.0x00158d0003120be7_contact from: closed platform: state to: open condition: - before: sunset before_offset: '1:00' condition: sun action: - service: light.turn_on entity_id: light.front_door_lights - id: '1555375051458' alias: Front Door Closed trigger: - entity_id: binary_sensor.0x00158d0003120be7_contact from: open platform: state to: closed condition:  action: - service: light.turn_off entity_id: light.front_door_lights