Add extra conditions to automations and allow for stopping light shutoff if door ajar

This commit is contained in:
Kenwood 2021-08-14 16:41:08 -04:00
parent 1db0d47dff
commit 634c5cd78f
1 changed files with 26 additions and 2 deletions

View File

@ -119,15 +119,39 @@
mode: single
- id: '1628551010045'
alias: Cascade Turn Off Basement Lights
description: If somebody turns off the lights at the stairwell, they prolly dont
description: 'If somebody turns off the lights at the stairwell, they prolly dont
mind if all the lights beyond that are turned off too.
will not turn off lights if the rear door is ajar'
trigger:
- platform: state
entity_id: switch.shop_lights
to: 'off'
condition: []
condition:
- condition: state
entity_id: binary_sensor.shop_door_sensor
state: 'off'
action:
- service: homeassistant.turn_off
target:
entity_id: group.basement
mode: single
- id: '1628966608945'
alias: Reactivate Basemnt footpath lights if door is propped
description: Checks if the basement door is propped whenever somebody tries to disable
the lights, and, if it is, reactivates all the lights
trigger:
- platform: state
entity_id: switch.shop_lights
to: 'off'
from: 'on'
condition:
- condition: state
entity_id: binary_sensor.shop_door_sensor
state: 'on'
action:
- service: homeassistant.turn_on
target:
entity_id: group.basement
mode: single