38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
|
###################################
|
||
|
## Tornados are no Joke.
|
||
|
###################################
|
||
|
|
||
|
- alias: 'High Wind Speed Notification'
|
||
|
hide_entity: True
|
||
|
trigger:
|
||
|
- platform: numeric_state
|
||
|
entity_id: sensor.dark_sky_wind_speed
|
||
|
above: 50
|
||
|
|
||
|
action:
|
||
|
- service: script.notify_engine
|
||
|
data_template:
|
||
|
value1: 'VERY HIGH WINDS:'
|
||
|
value2: "{{ states('sensor.dark_sky_wind_speed')}}"
|
||
|
value3: ' '
|
||
|
|
||
|
- service: input_boolean.turn_on
|
||
|
entity_id: input_boolean.alert_mode
|
||
|
|
||
|
- service: script.speech_engine
|
||
|
data_template:
|
||
|
value1: >
|
||
|
"ATTENTION: The wind speed is now {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. Please make sure everyone is inside for safety."
|
||
|
call_window_check: 1
|
||
|
call_garage_check: 1
|
||
|
|
||
|
- service: script.emergency
|
||
|
|
||
|
- service: script.tweet_engine
|
||
|
data_template:
|
||
|
tweet: >
|
||
|
{{ [
|
||
|
"Wind speed is {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. For safety, I'm going to close the @garadget doors.",
|
||
|
"Getting pretty windy! {{ states('sensor.dark_sky_wind_speed')|round}}MPH. Time to ask @Garadget to close the garage doors."
|
||
|
] | random + "(http://amzn.to/2jQLpVQ)"}}
|