Briefings now use a template sensor for the weather alerts report

This commit is contained in:
2023-03-05 22:01:55 -05:00
parent 66486ae9c0
commit fede276214
6 changed files with 41 additions and 75 deletions

View File

@ -74,21 +74,7 @@
<p>
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
"Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weatheralerts_active_alerts') }}. They are as follows. "
{% if is_state('sensor.weatheralerts_alert_1','on') %}
"{{ state_attr('sensor.weatheralerts_alert_1','alert_event') }}"
{% endif %}
{% if is_state('sensor.weatheralerts_alert_2','on') %}
"{{ state_attr('sensor.weatheralerts_alert_2','alert_event') }}"
{% endif %}
{% if is_state('sensor.weatheralerts_alert_3','on') %}
"{{ state_attr('sensor.weatheralerts_alert_3','alert_event') }}"
{% endif %}
{% if is_state('sensor.weatheralerts_alert_4','on') %}
"{{ state_attr('sensor.weatheralerts_alert_4','alert_event') }}"
{% endif %}
{% if is_state('sensor.weatheralerts_alert_5','on') %}
"{{ state_attr('sensor.weatheralerts_alert_5','alert_event') }}"
{% endif %}
{{ states('sensor.weather_alert_string') }}.
{% endif %}
</p>