From 20b0eb0dcca8a382b76e97730317d23386434dda Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Wed, 3 May 2017 19:47:07 +0000 Subject: [PATCH] Closes #152 - No early moring announcements that are routine. --- automation/Speech/garage_opened.yaml | 8 +++++++- group/SleepIQ_Bed.yaml | 0 2 files changed, 7 insertions(+), 1 deletion(-) delete mode 100755 group/SleepIQ_Bed.yaml diff --git a/automation/Speech/garage_opened.yaml b/automation/Speech/garage_opened.yaml index 43c3748e..93caa04e 100755 --- a/automation/Speech/garage_opened.yaml +++ b/automation/Speech/garage_opened.yaml @@ -14,7 +14,13 @@ for: '00:02:30' action: - - service: input_boolean.turn_on + - service_template: > + {% set hour=states("sensor.time").split(':')[0] | int %} + {% if hour >= 7 and hour <= 9 and states.input_boolean.school_mode.state == 'on'%} + input_boolean.turn_off + {% else %} + input_boolean.turn_on + {% endif %} entity_id: input_boolean.alert_mode - service: script.Voice_notify diff --git a/group/SleepIQ_Bed.yaml b/group/SleepIQ_Bed.yaml deleted file mode 100755 index e69de29b..00000000