From 97a54bf65a69fe509c7ed6b29eae69726f8849df Mon Sep 17 00:00:00 2001 From: ccostan Date: Sun, 28 Jan 2018 17:28:28 -0500 Subject: [PATCH] Updates to the sounds.. I don't want to be bothered when I am in bed. --- automation/System/CucKoo_Clock.yaml | 25 ++++++++----------- .../{mychevy.yaml => mychevy.yaml.disabled} | 0 script/amp_settings.yaml | 3 +++ 3 files changed, 14 insertions(+), 14 deletions(-) rename packages/{mychevy.yaml => mychevy.yaml.disabled} (100%) diff --git a/automation/System/CucKoo_Clock.yaml b/automation/System/CucKoo_Clock.yaml index 79750b2d..313d4f42 100755 --- a/automation/System/CucKoo_Clock.yaml +++ b/automation/System/CucKoo_Clock.yaml @@ -14,7 +14,7 @@ condition: - condition: time - after: '09:30:00' + after: '09:29:00' before: '21:30:00' - condition: state entity_id: group.family @@ -28,25 +28,22 @@ {% endif %} action: - - service: media_player.turn_on - entity_id: media_player.livingroomCC - - - service: switch.turn_on - entity_id: switch.living_room_amp - - delay: '00:00:05' - - - service: media_player.volume_set - entity_id: - - media_player.livingroomCC + - service: script.amp_settings data: + media_player: 'media_player.livingroomcc' volume_level: 0.22 + - wait_template: >- + {{ states.switch.living_room_amp.state == 'on' }} - service: media_player.play_media data_template: - entity_id: - - media_player.livingroomCC + entity_id: > + {% if states.group.bed.state == 'off' %} + media_player.livingroomCC + {% else %} - media_player.alarm_clock - # - media_player.bedroom_alarm_panel + - media_player.bedroom_alarm_panel + {% endif %} media_content_id: > {% if now().strftime("%M")|int == 30 %} https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-01.wav diff --git a/packages/mychevy.yaml b/packages/mychevy.yaml.disabled similarity index 100% rename from packages/mychevy.yaml rename to packages/mychevy.yaml.disabled diff --git a/script/amp_settings.yaml b/script/amp_settings.yaml index c2660060..ab3fa186 100755 --- a/script/amp_settings.yaml +++ b/script/amp_settings.yaml @@ -37,6 +37,9 @@ amp_settings: - condition: state entity_id: switch.living_room_amp state: 'off' + - condition: state + entity_id: group.bed + state: 'off' - service: switch.turn_on data: