From 25e36ffc59fe9cdae882f828e9ec67dce1da3dc0 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 5 Jun 2022 22:28:11 +0200 Subject: [PATCH] Update Alarm Clock --- configuration/automations/alarm-clock.yaml | 66 ++++++++++++---------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/configuration/automations/alarm-clock.yaml b/configuration/automations/alarm-clock.yaml index 3eb5150..68c6eca 100644 --- a/configuration/automations/alarm-clock.yaml +++ b/configuration/automations/alarm-clock.yaml @@ -1,5 +1,5 @@ -- id: alarm-automation - alias: '[Alarm] Wakeup automation' +- id: alarm-clock-automation + alias: '[Alarm-Clock] Wakeup automation' trigger: - platform: state entity_id: calendar.automations_wakeup @@ -13,25 +13,19 @@ data: kelvin: 2000 brightness: 1 - entity_id: light.bedroom_lights + entity_id: + - light.bedroom_lights + - light.bed_lamps + - light.bed_lightstrip - service: light.turn_on data: kelvin: 5300 transition: 1800 brightness: 255 - entity_id: light.bedroom_lights - - service: light.turn_on - data: - kelvin: 5300 - transition: 1800 - brightness: 255 - entity_id: light.bed_lamps - - service: light.turn_on - data: - kelvin: 5300 - transition: 1800 - brightness: 255 - entity_id: light.bed_lightstrip + entity_id: + - light.bedroom_lights + - light.bed_lamps + - light.bed_lightstrip - repeat: count: 10 sequence: @@ -42,22 +36,34 @@ position: "{{ repeat.index * 10 | int }}" - delay: seconds: 180 - - service: media_player.volume_set - data: - volume_level: 0.1 - entity_id: media_player.bedroom - - delay: - seconds: 10 - - service: media_player.play_media - data: - entity_id: media_player.bedroom - media_content_id: 'https://open.spotify.com/playlist/3Qu9kE0ivJIkn76pxTLMFe' - media_content_type: music - - service: script.good_morning - - delay: - minutes: 30 + - choose: + - conditions: + - condition: state + entity_id: alarm_control_panel.home_alarm + state: disarmed + sequence: + - service: media_player.volume_set + data: + volume_level: 0.1 + entity_id: media_player.bedroom + - delay: + seconds: 10 + - service: media_player.play_media + data: + entity_id: media_player.bedroom + media_content_id: 'https://open.spotify.com/playlist/3Qu9kE0ivJIkn76pxTLMFe' + media_content_type: music + - service: script.good_morning + - delay: + minutes: 30 - service: automation.turn_on target: entity_id: - automation.bedroom_motion_off + - service: light.turn_off + target: + entity_id: + - light.bedroom_lights + - light.bed_lamps + - light.bed_lightstrip mode: single