Home Assistant Git Exporter
parent
0f23046cee
commit
576f7b3868
|
@ -260,6 +260,9 @@ automation:
|
||||||
# rule out error states (HA bootup, reloading, etc)
|
# rule out error states (HA bootup, reloading, etc)
|
||||||
- "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}"
|
- "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}"
|
||||||
|
|
||||||
|
# Without a `from`/`to` in trigger, it fires on any _update_ not necessarily a _change_
|
||||||
|
- "{{ trigger.from_state.state != trigger.to_state.state }}"
|
||||||
|
|
||||||
# has to have been off or describing what is already playing
|
# has to have been off or describing what is already playing
|
||||||
- "{{ trigger.from_state.state in ['off', states('sensor.current_living_room_media_player_source')] }}"
|
- "{{ trigger.from_state.state in ['off', states('sensor.current_living_room_media_player_source')] }}"
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ automation:
|
||||||
to: "off"
|
to: "off"
|
||||||
for:
|
for:
|
||||||
minutes: 15
|
minutes: 15
|
||||||
|
condition: "{{ is_state('binary_sensor.bo_s_office_is_occupied', 'off') }}"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
target:
|
target:
|
||||||
|
@ -46,12 +47,18 @@ automation:
|
||||||
- bo_s_office
|
- bo_s_office
|
||||||
- if:
|
- if:
|
||||||
- "{{ is_state('binary_sensor.bo_s_office_door_contact', 'off') }}" # closed
|
- "{{ is_state('binary_sensor.bo_s_office_door_contact', 'off') }}" # closed
|
||||||
- "{{ is_state('binary_sensor.bo_s_office_is_occupied', 'off') }}"
|
then:
|
||||||
|
- if:
|
||||||
|
- or:
|
||||||
|
- "{{ is_state('sensor.bandersnatch_displays', '1') }}"
|
||||||
|
- not: "{{ is_state('device_tracker.bandersnatch_hass', 'home') }}"
|
||||||
then:
|
then:
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
area_id:
|
entity_id: switch.bo_s_desk_plug
|
||||||
- bo_s_office
|
- service: switch.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: switch.bo_s_office_plug
|
||||||
|
|
||||||
- id: 2d1034acdee3afde7b67224b4898bd87b5cd356c
|
- id: 2d1034acdee3afde7b67224b4898bd87b5cd356c
|
||||||
alias: Turn on Ri's office when door opened
|
alias: Turn on Ri's office when door opened
|
||||||
|
|
Loading…
Reference in New Issue