From 7e7443a9f89b7a27919fbb9903af0a0867700f45 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 3 Sep 2023 23:33:07 +0200 Subject: [PATCH] Turn off some automations when guests are visiting --- configuration/automations/guests.yaml | 45 +++++++++++++++++++++++++++ configuration/configuration.yaml | 3 ++ 2 files changed, 48 insertions(+) create mode 100644 configuration/automations/guests.yaml diff --git a/configuration/automations/guests.yaml b/configuration/automations/guests.yaml new file mode 100644 index 0000000..c5396ca --- /dev/null +++ b/configuration/automations/guests.yaml @@ -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 diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index 3df2d6f..33d327c 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -28,6 +28,9 @@ input_boolean: daily_coffee: name: "Daily - coffee drank" icon: "mdi:coffee" + guests_at_home: + name: "Guests at home" + icon: "mdi:account-group" intercom_button: name: "Intercom button helper" icon: "mdi:door-closed-lock"