diff --git a/automations.yaml b/automations.yaml index 91aa851..a41f739 100644 --- a/automations.yaml +++ b/automations.yaml @@ -841,3 +841,41 @@ alias: TTS Announcement alias: If stopping show mode: restart +- id: '1678225060371' + alias: Tornado Watch Handling + description: Controls the input boolean for tornado watches, for use in briefings + or automations + trigger: + - platform: numeric_state + entity_id: sensor.weatheralerts_active_alerts + attribute: tornado_watch_count + above: 0 + id: watch_issued + alias: Watch Issued + - platform: numeric_state + entity_id: sensor.weatheralerts_active_alerts + attribute: tornado_watch_count + below: 1 + id: watch_cleared + alias: Watch Cleared + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: watch_issued + sequence: + - service: input_boolean.turn_on + data: {} + target: + entity_id: input_boolean.tornado_watch + - conditions: + - condition: trigger + id: watch_cleared + sequence: + - service: input_boolean.turn_off + data: {} + target: + entity_id: input_boolean.tornado_watch + alias: Control input boolean + mode: restart diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index cd35ba4..efff135 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -33,6 +33,15 @@

{{ states('sensor.current_conditions_detail') }} + {% 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('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [ diff --git a/templates/speech/morning_briefing.yaml b/templates/speech/morning_briefing.yaml index b33bbec..827b159 100644 --- a/templates/speech/morning_briefing.yaml +++ b/templates/speech/morning_briefing.yaml @@ -53,6 +53,15 @@ 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('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [ diff --git a/templates/speech/nightly_briefing.yaml b/templates/speech/nightly_briefing.yaml index 78e97d1..fc05224 100644 --- a/templates/speech/nightly_briefing.yaml +++ b/templates/speech/nightly_briefing.yaml @@ -11,6 +11,15 @@ ] | 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 is_state('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [ diff --git a/templates/speech/weather_briefing_full.yaml b/templates/speech/weather_briefing_full.yaml index 2ba97dc..da8db4a 100644 --- a/templates/speech/weather_briefing_full.yaml +++ b/templates/speech/weather_briefing_full.yaml @@ -3,6 +3,15 @@ {%- macro getReport() -%}

+ {% 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('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [ diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index 91d5381..fbfcb2a 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -61,6 +61,15 @@ {% endif %}

+ {% 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('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [