Files
fresh-home/automations/rooms/garage/garage_lights_to_off.yaml
T
2024-04-14 14:08:56 -04:00

43 lines
917 B
YAML

alias: Garage Lights to Off
id: automation_garage_lights_to_off
mode: restart
trigger:
- platform: state
entity_id: input_boolean.garage_occupied
to: 'off'
- platform: state
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
- binary_sensor.garage_door
to: 'off'
for: '00:10:00'
- platform: state
entity_id: binary_sensor.garage_naturally_lit
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.lighting_automations
state: 'on'
- condition: state
entity_id: light.garage_overhead
state: 'on'
- condition: state
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
#- binary_sensor.garage_door
- input_boolean.garage_occupied
state: 'off'
action:
- service: light.turn_off
data:
entity_id: light.garage_overhead