Rather large security update, might have finally cracked this #83

This commit is contained in:
2023-11-18 23:10:29 -05:00
parent aab01b46f4
commit 534fb68055
5 changed files with 126 additions and 60 deletions

View File

@ -87,17 +87,17 @@
</p>
<p>
{% set windows = states('sensor.windows_open') %}
{% set doors = states('sensor.doors_open') %}
{% set windows = states('sensor.window_faults') %}
{% set doors = states('sensor.door_faults') %}
{% if states('sensor.total_faults') > '0' %}
{% 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. "
"There are currently {{ states('sensor.window_faults') }} {% if windows == '1' %}window {% else %}windows {% endif %}and {{ states('sensor.door_faults') }} {% 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. "
"There {% if windows == '1' %}is {% else %}are {% endif %}currently {{ states('sensor.window_faults') }} {% 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. "
"There {% if doors == '1' %}is {% else %}are {% endif %}currently {{ states('sensor.door_faults') }} {% if doors == '1' %}door {% else %}doors {% endif %}open. "
{% endif %}
{% endif %}
"You will want to close these before the security system is armed for the night. "