Home-AssistantConfig/config/automation/Speech/High_Wind_Speed_Check.yaml

56 lines
1.9 KiB
YAML
Executable File

###################################
## Tornados are no Joke.
###################################
- alias: 'High Wind Speed Notification'
id: 5cc158a5-038a-4078-a9fb-c9f9cf9ecd49
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.pirateweather_wind_speed
above: 30
- platform: numeric_state
entity_id: sensor.pirateweather_wind_speed
above: 40
- platform: numeric_state
entity_id: sensor.pirateweather_wind_speed
above: 60
action:
- service: script.notify_engine
data:
title: 'VERY HIGH WINDS:'
value1: >-
{% set windspeed = states.sensor.pirateweather_wind_speed.state | round %}
{% if ( windspeed > 31 ) and ( windspeed <= 45 ) %}
HEAVY WINDS!!! Current Wind Speed is : {{windspeed}} mph! Be VERY careful outdoors!
{% elif ( windspeed > 45 ) and ( windspeed <= 60 ) %}
Warning! Wind speed is {{windspeed}} MPH. FIND SHELTER IMMEDIATELY!
{% elif ( windspeed > 60 ) %}
HURRICANE WINDS. FIND SHELTER, AND STAY INDOORS!
{% endif %}
who: 'family'
group: 'Alert'
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.speech_engine
data:
value1: >
{% set windspeed = states.sensor.pirateweather_wind_speed.state | round %}
{% if ( windspeed > 31 ) and ( windspeed <= 40 ) %}
HEAVY WINDS!!! Current Wind Speed is : {{windspeed}} mph! Be VERY careful outdoors!
{% elif ( windspeed > 40 ) and ( windspeed <= 60 ) %}
Warning! Wind speed is {{windspeed}} MPH. FIND SHELTER IMMEDIATELY!
{% elif ( windspeed > 60 ) %}
HURRICANE WINDS. FIND SHELTER, AND STAY INDOORS!
{% endif %}
call_window_check: 1
call_garage_check: 1
- service: script.emergency
- delay:
hours: 2