Add new condition for basement door sensor closed
This commit is contained in:
@ -549,19 +549,49 @@ automation:
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
id: door-open
|
||||
- platform: state
|
||||
entity_id: binary_sensor.basement_studio_door
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 10
|
||||
id: door-closed
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.studio_quiet
|
||||
state: 'off'
|
||||
action:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: light.basement_studio_lights
|
||||
state: 'off'
|
||||
then:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: door-open
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: light.basement_studio_lights
|
||||
state: 'off'
|
||||
then:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.basement_studio_lights
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: door-closed
|
||||
sequence:
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.tony_desktop_on
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.kallen_desktop_on
|
||||
state: 'off'
|
||||
then:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.basement_studio_lights
|
||||
|
||||
|
||||
script:
|
||||
adaptive_on_first_floor:
|
||||
|
Reference in New Issue
Block a user