Add functionality for tornado watches

This commit is contained in:
2023-03-07 16:49:21 -05:00
parent 9bddba66b5
commit f7542f4aff
6 changed files with 83 additions and 0 deletions

View File

@ -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

View File

@ -33,6 +33,15 @@
<p>
{{ 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 %}
{{ [

View File

@ -53,6 +53,15 @@
It is currently {{states.weather.iron_nerd_weather_station.state}} and {{states.sensor.pirateweather_temperature.state|round}} degrees in Defiance.
</p>
<p>
{% 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 %}
{{ [

View File

@ -11,6 +11,15 @@
] | random }}
</p>
<p>
{% 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 %}
{{ [

View File

@ -3,6 +3,15 @@
{%- macro getReport() -%}
<p>
{% 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 %}
{{ [

View File

@ -61,6 +61,15 @@
{% endif %}
</p>
<p>
{% 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 %}
{{ [