A little background, I have a stairwell that leads to two doors, one garage door, one front door. When I walk down the stairwell I have a motion sensor that turns on the hallway lights for 1 minute. This also happens if I open one of the two doors.
What I would like to do is have the lights turn on if I walk down the stairs and then turn off if one of the doors is open, and vice versa, if I open one of the doors the lights turn on, and then turn off after I walk by the motion sensor on the stairs. Is it possible to do this both ways like I’m asking?
I currently have the following automation, and it works well:
- id: '1653420314161'
alias: Hallway Motion Triggered Lights
description: ''
trigger:
- type: motion
platform: device
device_id: 77d39428abe145aebee509b8f7a9cc03
entity_id: binary_sensor.third_reality_inc_3rms16bz_iaszone
domain: binary_sensor
- type: opened
platform: device
device_id: 67c71e4256c239940d1ce93d2dea9cba
entity_id: binary_sensor.front_door
domain: binary_sensor
- type: opened
platform: device
device_id: 180b3575c189246a006588db1642c9b4
entity_id: binary_sensor.house_garage_door
domain: binary_sensor
condition: []
action:
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- light.hallway
- light.stairway_lights
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- light.hallway
- switch.stairway_lights
mode: single