-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathweather_automations.yaml
133 lines (128 loc) · 5.19 KB
/
weather_automations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#
# Weather related automations goes here
#
- alias: Alert Daily Weather
trigger:
platform: time
after: '05:25:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: script.ifttt_notify
data_template:
value1: "Today's Weather High: {{states('sensor.dark_sky_daily_high_temperature')}} F, Feels like: {{states('sensor.dark_sky_daily_high_apparent_temperature')}} F. Today's Weather Low: {{states('sensor.dark_sky_daily_low_temperature')}} F, Feels like: {{states('sensor.dark_sky_daily_low_apparent_temperature')}} F."
value2: ""
- service: script.ifttt_notify
data_template:
value1: "Today's Summary: {{states('sensor.dark_sky_daily_summary')}}"
value2: ""
- service: mqtt.publish
data_template:
topic: !secret mqtt_announcement_topic
payload: "Today's weather report. Today's High temperature is {{states('sensor.dark_sky_daily_high_temperature')}} degrees, and feels like: {{states('sensor.dark_sky_daily_high_apparent_temperature')}} degrees. Today's Weather low temperature is {{states('sensor.dark_sky_daily_low_temperature')}} degrees, and feels like {{states('sensor.dark_sky_daily_low_apparent_temperature')}} degrees fahrenheit"
# Alert on High Wind Speeds
#
# - alias: Alert Wind Speeds Tollerable
# trigger:
# platform: state
# entity_id: sensor.dark_sky_wind_speed
# condition:
# condition: and
# conditions:
# - condition: template
# value_template: "{{ states('sensor.dark_sky_wind_speed') | int > 15 }}"
# - condition: template
# value_template: "{{ states('sensor.dark_sky_wind_speed') | int < 25 }}"
# action:
# - service: script.ifttt_notify
# data_template:
# value1: "Current Wind Speed is : {{states('sensor.dark_sky_wind_speed')}} mph."
# value2: ""
# Reminder to keep trash cans inside
- alias: Alert Wind Speeds Medium
trigger:
platform: state
entity_id: sensor.dark_sky_wind_speed
condition:
condition: and
conditions:
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int > 24 }}"
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int < 40 }}"
action:
- service: script.ifttt_notify
data_template:
value1: "HEAVY WINDS!!! Current Wind Speed is : {{states('sensor.dark_sky_wind_speed')}} mph! Be VERY careful outdoors!"
value2: ""
- service: mqtt.publish
data_template:
topic: !secret mqtt_announcement_topic
payload: "Warning! Heavy winds outside. The current wind speed is {{states('sensor.dark_sky_wind_speed')}} miles per hour. Please be careful outdoors!"
# Reminder to keep trash cans inside
- alias: Alert Wind Speeds High
trigger:
platform: state
entity_id: sensor.dark_sky_wind_speed
condition:
condition: and
conditions:
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int > 39 }}"
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int < 70 }}"
action:
- service: script.ifttt_notify
data_template:
value1: "STAY INDOORS... HEAVY WINDS OUTSIDE!!! Wind Speed is : {{states('sensor.dark_sky_wind_speed')}} MPH!"
value2: ""
- service: mqtt.publish
data_template:
topic: !secret mqtt_announcement_topic
payload: "Warning! Warning! Warning! Extreme heavy winds outside. The current wind speed is {{states('sensor.dark_sky_wind_speed')}} miles per hour. Please do not go outside. Stay indoors in the basement!"
# Reminder to keep trash cans inside
- alias: Alert Wind Speeds Hurricane
trigger:
platform: state
entity_id: sensor.dark_sky_wind_speed
condition:
condition: and
conditions:
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int > 69 }}"
- condition: template
value_template: "{{ states('sensor.dark_sky_wind_speed') | int < 100 }}"
action:
- service: script.ifttt_notify
data_template:
value1: "IT IS HURRICANE OUTDIDE. GO INTO THE BASEMENT NOW!!! Wind Speed is : {{states('sensor.dark_sky_wind_speed')}} MPH!"
value2: ""
- service: mqtt.publish
data_template:
topic: !secret mqtt_announcement_topic
payload: "Warning! Warning! Warning! You must be a fool to go outside. Think about your family once before you step outside. The current wind speed is {{states('sensor.dark_sky_wind_speed')}} miles per hour. Please do not go outside. Stay indoors in the basement! There is a hurricane outside. Take shelter!"
# Reminder to keep trash cans inside
- alias: High Wind Speed Flash Lights
# hide_entity: True
trigger:
- platform: numeric_state
entity_id: sensor.dark_sky_wind_speed
above: 30
action:
- service: light.turn_on
entity_id:
- group.all_lights
data:
flash: short
- service: script.ifttt_notify
data_template:
value1: "HEAVY WINDS!!! Current Wind Speed is : {{states('sensor.dark_sky_wind_speed')}} mph! Be VERY careful outdoors!"
value2: ""