From d32d4ac307fe307c88db40da40365bf469d4c931 Mon Sep 17 00:00:00 2001
From: Tony Stork
Date: Mon, 21 Nov 2022 19:43:46 -0500
Subject: [PATCH] Expanded thermal comfort info, moved to custom_weather.yaml
close #59
---
packages/custom_weather.yaml | 17 +++++++++++++++++
templates/speech/weather_briefing_full.yaml | 8 --------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/packages/custom_weather.yaml b/packages/custom_weather.yaml
index b24f560..3d742c3 100644
--- a/packages/custom_weather.yaml
+++ b/packages/custom_weather.yaml
@@ -778,6 +778,23 @@ sensor:
Warning, the heat index is {{ heatindex }} degrees right now, which is very high. So please make sure to stay hydrated!
{% endif %}
{% endif %}
+ {% if states('sensor.outside_simmerindex') in ['extremely_warm','danger_of_heatstroke','extreme_danger_of_heatstroke','circulatory_collapse_imminent'] %}
+ "To reiterate, it is dangerously hot outside! "
+ {% endif %}
+ {% if is_state('sensor.outside_perception','somewhat_uncomfortable') %}
+ "The humidity is somewhat uncomfortable outside."
+ {% elif is_state('sensor.outside_perception','quite_uncomfortable') %}
+ "The humidity is very uncomfortable outside. "
+ {% elif is_state('sensor.outside_perception','extremely_uncomfortable') %}
+ "The humidity outside is extremely uncomfortable and oppresive. "
+ {% elif is_state('sensor.outside_perception','severely_high') %}
+ "The humidity outside is severely high, and could even be deadly for asthma related illnesses. "
+ {% endif %}
+ {% if is_state('sensor.outside_frostrisk','high') %}
+ "There is currently a high chance of frost outside. Plan accordingly! "
+ {% elif is_state('sensor.outside_frostrisk','probable') %}
+ "The possibility of frost exists currently. Be prepared. "
+ {% endif %}
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
diff --git a/templates/speech/weather_briefing_full.yaml b/templates/speech/weather_briefing_full.yaml
index cca5e5f..b46f643 100644
--- a/templates/speech/weather_briefing_full.yaml
+++ b/templates/speech/weather_briefing_full.yaml
@@ -12,14 +12,6 @@
{{ states('sensor.clothing_forecast_detail') }}
-
- {% if is_state('sensor.outside_frostrisk','high') %}
- "There is currently a high chance of frost outside. Plan accordingly! "
- {% elif is_state('sensor.outside_frostrisk','probable') %}
- "The possibility of frost exists currently. Be prepared. "
- {% endif %}
-
-
{% 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. "