1
0
Fork 0

Home Assistant Git Exporter

main
31c0fe9c6dbd74bcdde92e1d2aaa03e1d272f75f 2022-05-13 08:27:25 +10:00
parent 0f23046cee
commit 576f7b3868
2 changed files with 13 additions and 3 deletions

View File

@ -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')] }}"

View File

@ -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: then:
- if:
- or:
- "{{ is_state('sensor.bandersnatch_displays', '1') }}"
- not: "{{ is_state('device_tracker.bandersnatch_hass', 'home') }}"
then:
- service: switch.turn_off
target:
entity_id: switch.bo_s_desk_plug
- service: switch.turn_off - service: switch.turn_off
target: target:
area_id: entity_id: switch.bo_s_office_plug
- bo_s_office
- id: 2d1034acdee3afde7b67224b4898bd87b5cd356c - id: 2d1034acdee3afde7b67224b4898bd87b5cd356c
alias: Turn on Ri's office when door opened alias: Turn on Ri's office when door opened