1
0
ansible-home-assistant/configuration/automations/guests.yaml
2023-09-12 19:20:57 +02:00

46 lines
1.3 KiB
YAML

- id: guests_at_home
alias: "[Guests] Guests at home"
trigger:
- platform: state
entity_id:
- input_boolean.guests_at_home
to: "on"
condition: [ ]
action:
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id:
- automation.behaviour_go_to_sleep
- automation.behaviour_go_to_sleep_hard_cutoff
- automation.living_room_lights_on
- automation.living_room_lights_off
- automation.table_lights_off
- automation.table_lights_on
- automation.office_lights_on
- automation.office_lights_off
- id: guests_left
alias: "[Guests] Guests left"
trigger:
- platform: state
entity_id:
- input_boolean.guests_at_home
to: "off"
condition: [ ]
action:
- service: automation.turn_on
data:
stop_actions: true
target:
entity_id:
- automation.behaviour_go_to_sleep
- automation.behaviour_go_to_sleep_hard_cutoff
- automation.living_room_lights_on
- automation.living_room_lights_off
- automation.table_lights_off
- automation.table_lights_on
- automation.office_lights_on
- automation.office_lights_off