From d809b0ddd205faa80d6d739941d3c800059f95d5 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Tue, 11 Apr 2023 12:47:03 -0400 Subject: [PATCH] Add info to daily briefing about windows/doors open --- templates/speech/daily_briefing.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index e77711a..4e32f98 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -305,6 +305,9 @@ {% if is_state('input_boolean.kallen_school_early_release','on') %} And It is early release! {% endif %} + {% if states('sensor.windows_open') | int > 0 %} + 'I detect that there are windows open. Make sure you close them before you leave, or else the security system will not arm. ' + {% endif %} {% endif %} {% if is_state('input_boolean.school_cancelled','on') %} 'School has been cancelled for today. ' @@ -351,7 +354,22 @@

- Around the house, there are currently {{ states.sensor.current_lights_on.state }} lights on. + 'Around the house, there are currently {{ states('sensor.current_lights_on') }} lights on. ' + {% set windows = states('sensor.windows_open') %} + {% set doors = states('sensor.doors_open') %} + {% if states('sensor.total_faults') > '0' %} + "Additionally, " + {% if windows > '0' and doors > '0' %} + "There are currently {{ states('sensor.windows_open') }} {% if windows == '1' %}window {% else %}windows {% endif %}and {{ states('sensor.doors_open') }} {% if doors == '1' %}door {% else %}doors {% endif %}open. " + {% else %} + {% if windows > '0' %} + "There {% if windows == '1' %}is {% else %}are {% endif %}currently {{ states('sensor.windows_open') }} {% if windows == '1' %}window {% else %}windows {% endif %}open. " + {% endif %} + {% if doors > '0' %} + "There {% if doors == '1' %}is {% else %}are {% endif %}currently {{ states('sensor.doors_open') }} {% if doors == '1' %}door {% else %}doors {% endif %}open. " + {% endif %} + {% endif %} + {% endif %}