Improve severe weather TTS alerts

This commit is contained in:
2023-05-02 18:26:56 -04:00
parent f1d20cfcd8
commit 3bd2ef755f
3 changed files with 119 additions and 39 deletions

View File

@ -1489,6 +1489,22 @@ automation:
entity_id: sensor.weatheralerts_active_alerts
attribute: tstorm_warning_count
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: and
conditions:
@ -1499,10 +1515,43 @@ automation:
- condition: template
value_template: "{{ state_attr('sensor.weatheralerts_alert_1', 'alert_id') not in states('input_text.weatheralerts_triggered_audible_alert_ids') }}"
action:
- service: script.speech_engine
data:
who: everywhere
message: Severe thunderstorm warning has been issued, it's about to get loud!
- choose:
- conditions:
- condition: trigger
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
data:
entity_id: input_text.weatheralerts_triggered_audible_alert_ids