From 64d65c9158d7b8e706dd4156264a1e48e43859f5 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 28 Aug 2023 23:56:44 +0200 Subject: [PATCH] Switch to calendar events for daily --- configuration/automations/work.yaml | 49 +++++++++++------------------ configuration/configuration.yaml | 3 ++ 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/configuration/automations/work.yaml b/configuration/automations/work.yaml index 676eb15..2cff0f2 100644 --- a/configuration/automations/work.yaml +++ b/configuration/automations/work.yaml @@ -79,16 +79,10 @@ - id: work_daily_minus_30m alias: '[Work] Daily -30m' trigger: - - platform: time - at: '10:30' - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri + - platform: calendar + event: start + offset: '-0:30:0' + entity_id: calendar.automations_daily action: - service: light.turn_on data: @@ -103,13 +97,10 @@ - platform: time at: '10:45' condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri + - platform: calendar + event: start + offset: '-0:15:0' + entity_id: calendar.automations_daily action: - service: light.turn_on data: @@ -121,16 +112,10 @@ - id: work_daily_minus_5m alias: '[Work] Daily -5m' trigger: - - platform: time - at: '10:55' - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri + - platform: calendar + event: start + offset: '-0:5:0' + entity_id: calendar.automations_daily action: - service: light.turn_on data: @@ -141,8 +126,9 @@ - id: work_daily_start alias: '[Work] Daily' trigger: - - platform: time - at: '11:00' + - platform: calendar + event: start + entity_id: calendar.automations_daily condition: - condition: time weekday: @@ -161,8 +147,9 @@ - id: work_dailY_end alias: '[Work] Daily end' trigger: - - platform: time - at: '11:30' + - platform: calendar + event: end + entity_id: calendar.automations_daily condition: - condition: time weekday: diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index eb445a3..3df2d6f 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -275,6 +275,9 @@ calendar: - name: "Wakeup" calendar: "Automations" search: "Wakeup" + - name: "Daily" + calendar: "Automations" + search: "Daily" - platform: caldav url: https://cloud.grondek.pl/remote.php/dav username: pgrondek