Add info to daily briefing about windows/doors open

This commit is contained in:
2023-04-11 12:47:03 -04:00
parent 415c234038
commit d809b0ddd2

View File

@ -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 @@
</p>
<p>
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 %}
</p>
<p>