From 9989ce1208bebc645ebb4a89f2798f34979fc1fb Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sat, 4 Feb 2017 23:17:45 +0000 Subject: [PATCH] Added some Volume controls so the speakers don't get blown out --- automation/watchdog.yaml | 2 +- script/voice_notify.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/automation/watchdog.yaml b/automation/watchdog.yaml index 3eb669da..2175d539 100755 --- a/automation/watchdog.yaml +++ b/automation/watchdog.yaml @@ -74,4 +74,4 @@ action: - service: script.Voice_notify data_template: - value1: "There has been a new device detected on the network. Be sure to appropriately catagorie it within Circle." + value1: "There has been a new device detected on the network. Be sure to appropriately catagorize it within Circle." diff --git a/script/voice_notify.yaml b/script/voice_notify.yaml index f56c312f..3e6f1faf 100755 --- a/script/voice_notify.yaml +++ b/script/voice_notify.yaml @@ -37,6 +37,19 @@ voice_notify: entity_id: switch.living_room_amp - delay: '00:00:05' + - service: media_player.volume_set + entity_id: + - media_player.whole_house + data_template: + volume_level: > + {% if now().strftime("%H")|int < 12 %} + 0.20 + {% elif now().strftime("%H")|int < 18 %} + 0.70 + {% else %} + 0.40 + {% endif %} + - service: tts.google_say entity_id: media_player.whole_house data_template: