1
0

Turn off some automations when guests are visiting

This commit is contained in:
Przemek Grondek 2023-09-03 23:33:07 +02:00
parent 8881f05642
commit 7e7443a9f8
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,45 @@
- 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: "on"
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

View File

@ -28,6 +28,9 @@ input_boolean:
daily_coffee: daily_coffee:
name: "Daily - coffee drank" name: "Daily - coffee drank"
icon: "mdi:coffee" icon: "mdi:coffee"
guests_at_home:
name: "Guests at home"
icon: "mdi:account-group"
intercom_button: intercom_button:
name: "Intercom button helper" name: "Intercom button helper"
icon: "mdi:door-closed-lock" icon: "mdi:door-closed-lock"