From 7451b3adcc9abbbb29af196a0af502492e4bb1a1 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 15 Dec 2022 00:41:40 +0100 Subject: [PATCH] Add automation for before wakeup --- configuration/automations/calendar.yaml | 20 ++++++++++++++++++++ scripts/10.modes.yaml | 11 +++++++++++ 2 files changed, 31 insertions(+) diff --git a/configuration/automations/calendar.yaml b/configuration/automations/calendar.yaml index e4181d4..16e8980 100644 --- a/configuration/automations/calendar.yaml +++ b/configuration/automations/calendar.yaml @@ -36,3 +36,23 @@ - service: switch.turn_on target: entity_id: switch.coffee_machine_on_off + +- id: calendar-before-wakeup + alias: "[Calendar] Before wakeup" + mode: single + trigger: + - platform: calendar + event: start + entity_id: calendar.automations_wakeup + offset: '-1:00:0' + condition: + - condition: or + conditions: + - condition: state + entity_id: alarm_control_panel.home_alarm + state: armed_home + - condition: state + entity_id: alarm_control_panel.home_alarm + state: disarmed + action: + - service: script.before_wakeup \ No newline at end of file diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 16fcfd6..3f6ca07 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -85,6 +85,17 @@ good_night: mode: single icon: mdi:weather-night +before_wakeup: + alias: Before wakeup + sequence: + - service: climate.set_temperature + data: + temperature: 25 + target: + entity_id: + - climate.office_thermostat + - climate.dining_thermostat + good_morning: alias: Good Morning sequence: