Improve severe weather TTS alerts
This commit is contained in:
@ -1010,7 +1010,7 @@ input_boolean:
|
|||||||
name: Severe Weather Mode
|
name: Severe Weather Mode
|
||||||
icon: mdi:weather-tornado
|
icon: mdi:weather-tornado
|
||||||
|
|
||||||
automation:
|
# automation:
|
||||||
# - alias: 'record previous day rainfall'
|
# - alias: 'record previous day rainfall'
|
||||||
# trigger:
|
# trigger:
|
||||||
# - platform: time
|
# - platform: time
|
||||||
@ -1022,39 +1022,39 @@ automation:
|
|||||||
# retain: true
|
# retain: true
|
||||||
# payload: "{{ states('sensor.todays_rainfall') }}"
|
# payload: "{{ states('sensor.todays_rainfall') }}"
|
||||||
|
|
||||||
- id: 14421478-a33c-471a-ae01-b48827f6121a
|
# - id: 14421478-a33c-471a-ae01-b48827f6121a
|
||||||
alias: Forecast Low Near Freezing
|
# alias: Forecast Low Near Freezing
|
||||||
trigger:
|
# trigger:
|
||||||
- platform: numeric_state
|
# - platform: numeric_state
|
||||||
entity_id: sensor.overnight_lowest_temperature
|
# entity_id: sensor.overnight_lowest_temperature
|
||||||
below: 35
|
# below: 35
|
||||||
- platform: numeric_state
|
# - platform: numeric_state
|
||||||
entity_id: sensor.pirateweather_temperature
|
# entity_id: sensor.pirateweather_temperature
|
||||||
below: 35
|
# below: 35
|
||||||
condition:
|
# condition:
|
||||||
- condition: state
|
# - condition: state
|
||||||
entity_id: input_boolean.freeze_warning
|
# entity_id: input_boolean.freeze_warning
|
||||||
state: 'off'
|
# state: 'off'
|
||||||
action:
|
# action:
|
||||||
- service: input_boolean.turn_on
|
# - service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.freeze_warning
|
# entity_id: input_boolean.freeze_warning
|
||||||
|
|
||||||
- id: 088285ec-6435-435c-a8ce-800851fb15e2
|
# - id: 088285ec-6435-435c-a8ce-800851fb15e2
|
||||||
alias: Forecast Low Above Freezing
|
# alias: Forecast Low Above Freezing
|
||||||
trigger:
|
# trigger:
|
||||||
- platform: numeric_state
|
# - platform: numeric_state
|
||||||
entity_id: sensor.overnight_lowest_temperature
|
# entity_id: sensor.overnight_lowest_temperature
|
||||||
above: 33
|
# above: 33
|
||||||
condition:
|
# condition:
|
||||||
- condition: state
|
# - condition: state
|
||||||
entity_id: input_boolean.freeze_warning
|
# entity_id: input_boolean.freeze_warning
|
||||||
state: 'on'
|
# state: 'on'
|
||||||
- condition: numeric_state
|
# - condition: numeric_state
|
||||||
entity_id: sensor.overnight_lowest_temperature
|
# entity_id: sensor.overnight_lowest_temperature
|
||||||
above: 35
|
# above: 35
|
||||||
action:
|
# action:
|
||||||
- service: input_boolean.turn_off
|
# - service: input_boolean.turn_off
|
||||||
entity_id: input_boolean.freeze_warning
|
# entity_id: input_boolean.freeze_warning
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -1639,13 +1639,32 @@ script:
|
|||||||
It is safe to resume normal activities.
|
It is safe to resume normal activities.
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro thunderstorm_warning() %}
|
||||||
|
{{ ['A severe thunderstorm warning has been issued, it is about to get loud!',
|
||||||
|
'The national weather service has issued a severe thunderstorm warning for our area.'
|
||||||
|
] | random }}
|
||||||
|
Make sure to secure any outdoor items and consider moving cars away from trees!
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro tornado_watch() %}
|
||||||
|
{{ ['A tornado watch has been issued. Keep an eye on the skies and your local weather experts, and move the cars away from trees!',
|
||||||
|
'The national weather service has issued a tornado watch. Keep your eyes peeled for rotating clouds, and move your cars away from trees!'
|
||||||
|
] | random}}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro thunderstorm_watch() %}
|
||||||
|
{{ ['A severe thunderstorm watch has been issued.',
|
||||||
|
'The national weather service has issued a severe thunderstorm watch.'
|
||||||
|
] | random }}
|
||||||
|
Make sure to secure any outdoor items and consider moving cars away from trees!
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro freeze_warning() %}
|
{% macro freeze_warning() %}
|
||||||
{% if is_state('input_boolean.freeze_warning','on') %}
|
'There is a freeze warning in effect for tonight. '
|
||||||
{{ [ 'It appears that it will be cold tonight. Like, the turn water solid kind of cold. Think of the poor plants.',
|
{{ [ 'It appears that it will be cold tonight. Like, the turn water solid kind of cold. Think of the poor plants.',
|
||||||
'I would say winter is coming. But, based on the weather forecast it appears to be here.',
|
'I would say winter is coming. But, based on the weather forecast it appears to be here.',
|
||||||
'It will be freezing cold tonight. I would bring in the plants but I lack legs. And Arms. So I am forced to rely on you. Do not let me down.'
|
'It will be freezing cold tonight. I would bring in the plants but I lack legs. And Arms. So I am forced to rely on you. Do not let me down.'
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro traffic_conditions() %}
|
{% macro traffic_conditions() %}
|
||||||
@ -1822,6 +1841,18 @@ script:
|
|||||||
{{ lightning_clear() }}
|
{{ lightning_clear() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_thunderstorm_warning == 1 %}
|
||||||
|
{{ thunderstorm_warning() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_tornado_watch == 1 %}
|
||||||
|
{{ tornado_watch() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_thunderstorm_watch == 1 %}
|
||||||
|
{{ thunderstorm_watch() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if call_freeze_warning == 1 %}
|
{% if call_freeze_warning == 1 %}
|
||||||
{{ freeze_warning() }}
|
{{ freeze_warning() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1489,6 +1489,22 @@ automation:
|
|||||||
entity_id: sensor.weatheralerts_active_alerts
|
entity_id: sensor.weatheralerts_active_alerts
|
||||||
attribute: tstorm_warning_count
|
attribute: tstorm_warning_count
|
||||||
above: 0
|
above: 0
|
||||||
|
id: tstorm-warning
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sensor.weatheralerts_active_alerts
|
||||||
|
attribute: tornado_watch_count
|
||||||
|
above: 0
|
||||||
|
id: tornado-watch
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sensor.weatheralerts_active_alerts
|
||||||
|
attribute: tstorm_watch_count
|
||||||
|
above: 0
|
||||||
|
id: tstorm-watch
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sensor.weatheralerts_active_alerts
|
||||||
|
attribute: freeze_warning_count
|
||||||
|
above: 0
|
||||||
|
id: freeze-warning
|
||||||
condition:
|
condition:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
@ -1499,10 +1515,43 @@ automation:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ state_attr('sensor.weatheralerts_alert_1', 'alert_id') not in states('input_text.weatheralerts_triggered_audible_alert_ids') }}"
|
value_template: "{{ state_attr('sensor.weatheralerts_alert_1', 'alert_id') not in states('input_text.weatheralerts_triggered_audible_alert_ids') }}"
|
||||||
action:
|
action:
|
||||||
- service: script.speech_engine
|
- choose:
|
||||||
data:
|
- conditions:
|
||||||
who: everywhere
|
- condition: trigger
|
||||||
message: Severe thunderstorm warning has been issued, it's about to get loud!
|
id: tstorm-warning
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
call_interruption: 1
|
||||||
|
call_thunderstorm_warning: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: tornado-watch
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
call_interruption: 1
|
||||||
|
call_tornado_watch: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: tstorm-watch
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
call_interruption: 1
|
||||||
|
call_thunderstorm_watch: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: freeze-warning
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
call_interruption: 1
|
||||||
|
call_freeze_warning: 1
|
||||||
- service: input_text.set_value
|
- service: input_text.set_value
|
||||||
data:
|
data:
|
||||||
entity_id: input_text.weatheralerts_triggered_audible_alert_ids
|
entity_id: input_text.weatheralerts_triggered_audible_alert_ids
|
||||||
|
Reference in New Issue
Block a user