-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
293 lines (292 loc) · 7.62 KB
/
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
- id: '1631640672138'
alias: Discord Morning Weather
description: Notify discord about the current weather in the morning.
trigger:
- platform: time
at: 06:00:00
condition: []
action:
- service: notify.weatherbot
data_template:
target: !secret discord_target
message: 'Its currently **{{ states(''weather.condo'') }}** and **{{ state_attr(''weather.condo'',''temperature'')
}}°F**.{{"\n"}} The pollen count for today is **{{ states(''sensor.allergy_index_today'')
}}**.{{"\n"}} Top allergens today:{{"\n"}} ``` {{ state_attr(''sensor.allergy_index_today'',''allergen_name_1'')
}}{{"\n"}} {{ state_attr(''sensor.allergy_index_today'',''allergen_name_2'')
}}{{"\n"}} {{ state_attr(''sensor.allergy_index_today'',''allergen_name_3'')
}} ```
'
mode: single
- id: '1631666335642'
alias: Sleepy Time
description: Turn the lights off slowly over an hour.
trigger:
- platform: time
at: '20:30:00'
condition: []
action:
- service: light.turn_off
target:
area_id: bedroom
data:
transition: 3600
mode: single
- id: '1631716153870'
alias: Chris Drive Time
description: Time it takes Chris to get home
trigger:
- platform: zone
entity_id: device_tracker.chris_note22
zone: zone.chris_s_work
event: leave
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
after: '14:00:00'
before: 00:00:00
- condition: state
entity_id: timer.chris_car_timer
state: idle
action:
- service: notify.homebot
data_template:
target: !secret discord_target
message: Chris will be home in about {{ states('sensor.chris_travel_time') }}
minutes (via {{ state_attr('sensor.chris_travel_time', 'route') }})
- service: timer.start
data:
duration: '0'
target:
entity_id: timer.chris_car_timer
mode: single
- id: '1631716820241'
alias: Heather Travel Time
description: Time for Heather to get home
trigger:
- platform: time
at: '16:20:00'
condition:
- condition: not
conditions:
- condition: zone
entity_id: person.heather
zone: zone.home
- condition: time
after: '16:00:00'
before: '17:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: notify.homebot
data_template:
target: !secret discord_target
message: Heather's drive will be about {{ states('sensor.heather_travel_time')
}} minutes (via {{ state_attr('sensor.heather_travel_time', 'route') }})
mode: single
- id: '1631838569878'
alias: Bedroom Button
description: Control what button does.
trigger:
- device_id: 80084b2bd66eeb0a43c1ad7786a4db4c
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition:
- condition: state
entity_id: timer.bedroomlighttimer
state: idle
action:
- service: timer.start
data:
duration: '10'
target:
entity_id: timer.bedroomlighttimer
- service: light.toggle
data: {}
target:
area_id: bedroom
mode: single
- id: '1632081644275'
alias: Living Room Button
description: Control what button does.
trigger:
- device_id: 39db91851bc1dfa679ba57165f914767
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
- device_id: 39db91851bc1dfa679ba57165f914767
domain: zha
platform: device
type: remote_button_double_press
subtype: remote_button_double_press
- device_id: 39db91851bc1dfa679ba57165f914767
domain: zha
platform: device
type: remote_button_long_press
subtype: remote_button_long_press
condition: []
action:
- service: light.toggle
data: {}
target:
area_id: living_room
mode: single
- id: '1632094679575'
alias: Autofan
description: turn on the fan if the temperature difference is greater than 1deg
trigger:
- platform: template
value_template: '{{ (states(''sensor.loft_sensor_temperature'')|float - states(''sensor.living_room_button_temperature'')|float)
>= 1.0 }}'
condition:
- condition: time
after: 08:00:00
before: '20:00:00'
- condition: state
entity_id: timer.fan_timer
state: idle
- condition: state
entity_id: fan.living_room_fan
state: 'off'
action:
- service: notify.homebot
data:
message: Temperature different greater than 1.0, turning on fan!
target: !secret discord_target
- service: timer.start
data:
duration: '0'
target:
entity_id: timer.fan_timer
- service: fan.set_speed
target:
device_id: 4ba0936fe51d4e347ae0c77865591111
data:
speed: '10'
mode: single
- id: '1632271081249'
alias: Autofan off
description: turn off the fan if the temperature difference is less than 0.5deg
trigger:
- platform: template
value_template: '{{ (states(''sensor.loft_sensor_temperature'')|float - states(''sensor.living_room_button_temperature'')|float)
<= 0.5 }}'
condition:
- condition: time
after: 08:00:00
before: '20:00:00'
- condition: state
entity_id: timer.fan_timer
state: idle
- condition: state
entity_id: fan.living_room_fan
state: 'on'
action:
- service: notify.homebot
data:
message: Temperature difference less than 0.5, turning off fan!
target: !secret discord_target
- service: fan.set_speed
target:
device_id: 4ba0936fe51d4e347ae0c77865591111
data:
speed: '0'
mode: single
- id: '1632820595137'
alias: Alarm Light
description: Turn on the lights after alarm is dismissed.
trigger:
- platform: mqtt
topic: SleepAsAndroid
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
after: 04:00:00
before: 07:00:00
action:
- service: light.turn_on
data:
brightness_pct: 25
target:
area_id: living_room
mode: single
- id: '1644704972132'
alias: Loft Light
description: switch loft light based on sensor
trigger:
- type: opened
platform: device
device_id: e575b162106d7bb3ff7d5c79329f138a
entity_id: binary_sensor.loft_sensor_ias_zone
domain: binary_sensor
condition: []
action:
- type: toggle
device_id: d7b52f539195a06eb010709cfc425cce
entity_id: light.loft_light
domain: light
mode: single
- id: '1646592331304'
alias: Discord Watch Charge
description: Notify discord about charging watch.
trigger:
- platform: numeric_state
entity_id: sensor.sm_r890_battery_level
below: '40'
condition: []
action:
- wait_template: '{{ is_state(''person.chris'', ''home'') }}'
- service: notify.homebot
data_template:
target: !secret discord_target
message: <@116694039960485896> watch is currently at {{states('sensor.sm_r890_battery_level')}}%
and needs to recharge.
mode: single
- id: '1647121107362'
alias: Cast to Google Hub
description: ''
use_blueprint:
path: kind3r/cast-and-re-cast-a-lovelace-view-to-a-google-hub.yaml
input:
player: media_player.kitchen_display
view: home
- id: '1647122312312'
alias: Set theme at startup
description: Set the theme at start up.
trigger:
- platform: homeassistant
event: start
action:
- service: frontend.set_theme
data:
mode: dark
name: noctis-solarized
mode: single
- id: '1680353539854'
alias: Low Battery
description: Alert for low battery
use_blueprint:
path: sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
input:
actions:
- service: notify.homebot
data_template:
target: !secret discord_target
message: 'Low Battery: {{sensors}}'
threshold: 20