From 1c4b41491525e8ee228e60ff92143e05eee3b7d5 Mon Sep 17 00:00:00 2001
From: Tony Stork
{{ greeting() }}
- {% if is_state('input_boolean.tornado_alarm','on') %}
- "We are under a tornado warning. If you are not already in shelter, you should be. Get on it! "
- {% elif is_state('input_boolean.tornado_watch','on') %}
- {{ [
- "There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ",
- "We are currently under a tornado watch. This means the possibility exists for a tornado to form. Be prepared, and be safe! ",
- "The National Weather Service has issued a tornado watch for our area. Be prepared to take shelter if a warning is issued! ",
- ] | random }}
- {% endif %}
- {% if is_state('binary_sensor.lightning_warning','on') %}
- {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
- {{ [
- "There are reports of lightning in the area, please stay safe. ",
- "My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
- "A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
- "Please exercise caution, as there is lightning in the area. ",
- "That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
- ] | random }}
- "The nearest lightning strike is {{ ltgdist }} miles away. "
- {% endif %}
- {% if states('sensor.weatheralerts_active_alerts') > '0' %}
- "Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weather_alerts_active_corrected') }}. They are as follows. "
- {{ states('sensor.weather_alert_string') }}.
- {% endif %}
- {% if (states('sensor.kdfi_visibility') | int ) < 3 %}
- {{ [
- "It is foggy outside, please exercise caution when driving. ",
- "The visibility outside is quite low. If you will be driving soon, please be cautious. ",
- "It is pea soup outside right now, and that is just as awful to drive in as it is to eat. Be careful! ",
- "Look out the window. Do you notice that you cannot see anything? Bear that in mind if you intend to drive any time soon. ",
- "Be advised, it is very difficult to see outside right now. Drive safely. "
- ] | random }}
- {% endif %}
- {{ states('sensor.current_conditions_detail') }}
-
- {{ [
- 'The weather for the rest of today should be,',
- 'The forecast for the rest of the day is,',
- 'Through the rest of your day, the weather is expected to be,'
- ] | random }}
- {{ states.sensor.current_forecast.state }}
-
- {{ [
- 'Just in case you were planning on going anywhere,',
- 'On the off chance that you planned to go outside,',
- 'If you were planning to go out and do something with your life,',
- ] | random }}
- {{ states('sensor.clothing_forecast_detail') }}
+ {{ weatherReport('full','tts','day') }}
diff --git a/templates/speech/morning_briefing.yaml b/templates/speech/morning_briefing.yaml
index 942fb04..667a3ab 100644
--- a/templates/speech/morning_briefing.yaml
+++ b/templates/speech/morning_briefing.yaml
@@ -5,6 +5,7 @@
{% from 'time.jinja' import input_datetime_12hr %}
{% from 'status.jinja' import tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %}
{% from 'easy_time.jinja' import count_the_days %}
+ {% from 'weather.jinja' import weatherReport %}
{{ greeting_nodate() }}
- It is currently {{states.weather.iron_nerd_weather_station.state}} and {{states.sensor.pirateweather_temperature.state|round}} degrees in Defiance. -
-- {% if is_state('input_boolean.tornado_alarm','on') %} - "We are under a tornado warning. If you are not already in shelter, you should be. Get on it! " - {% elif is_state('input_boolean.tornado_watch','on') %} - {{ [ - "There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ", - "We are currently under a tornado watch. This means the possibility exists for a tornado to form. Be prepared, and be safe! ", - "The National Weather Service has issued a tornado watch for our area. Be prepared to take shelter if a warning is issued! ", - ] | random }} - {% endif %} - {% if is_state('binary_sensor.lightning_warning','on') %} - {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} - {{ [ - "There are reports of lightning in the area, please stay safe. ", - "My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ", - "A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ", - "Please exercise caution, as there is lightning in the area. ", - "That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ", - ] | random }} - "The nearest lightning strike is {{ ltgdist }} miles away. " - {% endif %} - {% if states('sensor.weatheralerts_active_alerts') > '0' %} - "Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weather_alerts_active_corrected') }}. They are as follows. " - {{ states('sensor.weather_alert_string') }}. - {% endif %} - {% if (states('sensor.kdfi_visibility') | int ) < 3 %} - {{ [ - "It is foggy outside, please exercise caution when driving. ", - "The visibility outside is quite low. If you will be driving soon, please be cautious. ", - "It is pea soup outside right now, and that is just as awful to drive in as it is to eat. Be careful! ", - "Look out the window. Do you notice that you cannot see anything? Bear that in mind if you intend to drive any time soon. ", - "Be advised, it is very difficult to see outside right now. Drive safely. " - ] | random }} - {% endif %} -
-- {{ [ - 'The rest of the day should be,', - 'Todays forecast should be ,' - ]|random }} - {{ states('sensor.current_forecast') }} -
-- {{ states('sensor.clothing_forecast_detail') }} + {{ weatherReport('full','tts','morning') }}
+{% if is_state('sensor.halloween_countdown','0') %} Happy Halloween! diff --git a/templates/speech/nightly_briefing.yaml b/templates/speech/nightly_briefing.yaml index 22ae701..9d5b201 100644 --- a/templates/speech/nightly_briefing.yaml +++ b/templates/speech/nightly_briefing.yaml @@ -5,6 +5,7 @@ {% from 'time.jinja' import input_datetime_12hr, read_time_from_calendar, next_twitch_stream %} {% from 'status.jinja' import tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %} {% from 'easy_time.jinja' import count_the_days %} + {% from 'weather.jinja' import weatherReport %}
{{ greeting() }}
@@ -16,42 +17,11 @@ "My programmer decided that I should say something interesting here, and then he realized that he is not interesting. ", ] | random }} +- {% if is_state('input_boolean.tornado_alarm','on') %} - "We are under a tornado warning. If you are not already in shelter, you should be. Get on it! " - {% elif is_state('input_boolean.tornado_watch','on') %} - {{ [ - "There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ", - "We are currently under a tornado watch. This means the possibility exists for a tornado to form. Be prepared, and be safe! ", - "The National Weather Service has issued a tornado watch for our area. Be prepared to take shelter if a warning is issued! ", - ] | random }} - {% endif %} - {% if states('sensor.weatheralerts_active_alerts') > '0' %} - "Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weather_alerts_active_corrected') }}. They are as follows. " - {{ states('sensor.weather_alert_string') }}. - {% endif %} - {% if is_state('binary_sensor.lightning_warning','on') %} - {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} - {{ [ - "There are reports of lightning in the area, please stay safe. ", - "My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ", - "A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ", - "Please exercise caution, as there is lightning in the area. ", - "That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ", - ] | random }} - "The nearest lightning strike is {{ ltgdist }} miles away. " - {% endif %} - {% if (states('sensor.kdfi_visibility') | int ) < 3 %} - "I know it is night time, but just in case, " - {{ [ - "It is foggy outside, please exercise caution when driving. ", - "The visibility outside is quite low. If you will be driving soon, please be cautious. ", - "It is pea soup outside right now, and that is just as awful to drive in as it is to eat. Be careful! ", - "Look out the window. Do you notice that you cannot see anything? Bear that in mind if you intend to drive any time soon. ", - "Be advised, it is very difficult to see outside right now. Drive safely. " - ] | random }} - {% endif %} + {{ weatherReport('full','tts','night') }}
+{{ tonyStatusReport('stream','tts') }} {% if is_state('binary_sensor.kallen_school_tomorrow','on') %}