diff --git a/node-red/projects/NerdFlows b/node-red/projects/NerdFlows index 26062d4..6e4ad7b 160000 --- a/node-red/projects/NerdFlows +++ b/node-red/projects/NerdFlows @@ -1 +1 @@ -Subproject commit 26062d4257c6264188a83099feaf905484a8f786 +Subproject commit 6e4ad7b9e64ee4c979db6aef622486112888670d diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index 46b590d..a97d0f1 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -55,8 +55,23 @@ and {{ states.weather.iron_nerd_weather_station.state }} {% endif %} - {% if states.sensor.weatheralerts_active_alerts.state | int > 0 %} - There are currently {{ states.sensor.weatheralerts_active_alerts.state }} active weather alerts for our area. + {% 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 %} {% endif %}

diff --git a/templates/speech/morning_briefing.yaml b/templates/speech/morning_briefing.yaml index 9fc8e62..3ec972d 100644 --- a/templates/speech/morning_briefing.yaml +++ b/templates/speech/morning_briefing.yaml @@ -42,8 +42,23 @@ It is currently {{states.weather.iron_nerd_weather_station.state}} and {{states.sensor.pirateweather_temperature.state|round}} degrees in Defiance.

- {% if states.sensor.weatheralerts_active_alerts.state | int > 0 %} - There are currently {{states.sensor.weatheralerts_active_alerts.state }} active weather alerts for our area. + {% 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 %} {% endif %}

diff --git a/templates/speech/nightly_briefing.yaml b/templates/speech/nightly_briefing.yaml index 8d4c2c1..e0d55db 100644 --- a/templates/speech/nightly_briefing.yaml +++ b/templates/speech/nightly_briefing.yaml @@ -31,6 +31,27 @@ {% 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. " + {% 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 %} + {% endif %} +

+

{% if is_state('sensor.garbage_collection_large_pickup','1') %} 'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!' diff --git a/templates/speech/weather_briefing_full.yaml b/templates/speech/weather_briefing_full.yaml index 2c96e83..b46f643 100644 --- a/templates/speech/weather_briefing_full.yaml +++ b/templates/speech/weather_briefing_full.yaml @@ -12,6 +12,27 @@ {{ states('sensor.clothing_forecast_detail') }}

+

+ {% 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 %} + {% endif %} +

+ {%- endmacro -%} diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index 08d4559..1202423 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -62,49 +62,28 @@

- {{ [ - "As you are no doubt aware, ", - "Even though you just came in from out there, I feel compelled to inform you that ", - "In case you weren't paying attention, ", - "If you were wondering, ", - "In case you are suddenly immune to weather effects, " - ] | random }} - "the weather outside is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees" - {% if is_state('weather.iron_nerd_weather_station','rainy') %} - {{ [ - 'with rain.', - 'with showers.' - ] | random }} - {% elif is_state('weather.iron_nerd_weather_station','cloudy') %} - {{ [ - 'with clouds.', - 'with cloudy skies.' - ] | random }} - {% elif is_state('weather.iron_nerd_weather_station','partlycloudy') %} - {{ [ - 'with some clouds.', - 'with partly cloudy skies.', - 'with scattered clouds.' - ] | random }} - {% elif is_state('weather.iron_nerd_weather_station','sunny') %} - {% if is_state('sun.sun','above_horizon') %} - {{ [ - 'and sunny.', - 'with sun.' - ] | random }} - {% else %} - {{ [ - 'and clear.', - 'with clear skies.' - ] | random }} + {% 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 %} - {% else %} - and {{ states.weather.iron_nerd_weather_station.state }} - {% 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 %} + {% endif %}

- "However, inside the house " + "The current climate control situation is as follows. " {% if is_state('input_boolean.master_bedroom_aircon_installed','on') %} "the master bedroom temperature is currently {{ state_attr('climate.master_bedroom_aircon','current_temperature') }} degrees. " {% if is_state('climate.master_bedroom_aircon','cool') %}