-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
490 lines (490 loc) · 12.1 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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
- id: turn_on_entry_lights_arrival
alias: Turn on entry lights when I arrive at night
description: ''
trigger:
- platform: device
device_id: 442f07fb47fb8d5df817f75fc8eb9b46
domain: cover
entity_id: cover.garage_door_1
type: opening
- platform: device
device_id: 56b4edbbe4528c577c61ab17051f08f3
domain: cover
entity_id: cover.garage_door_2
type: opening
- platform: device
device_id: 442f07fb47fb8d5df817f75fc8eb9b46
domain: cover
entity_id: cover.garage_door_1
type: opened
- platform: device
device_id: 56b4edbbe4528c577c61ab17051f08f3
domain: cover
entity_id: cover.garage_door_2
type: opened
condition:
- condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
action:
- service: script.entry_lights_on_from_garage
data: {}
- id: turn_on_entry_lights_garage
alias: Turn on entry lights from garage entry switch
trigger:
- entity_id: input_boolean.garage_entry
from: 'off'
platform: state
to: 'on'
action:
- data:
stop_actions: true
service: automation.turn_off
target:
entity_id: automation.turn_on_entry_lights_from_kitchen_entry_switch
- service: script.entry_lights_on_from_garage
data: {}
- data: {}
entity_id: automation.turn_on_entry_lights_from_kitchen_entry_switch
service: automation.turn_on
mode: single
- id: turn_on_entry_lights_kitchen
alias: Turn on entry lights from kitchen entry switch
trigger:
- platform: state
entity_id: switch.kitchen_entry_56
from: 'off'
to: 'on'
action:
- data:
stop_actions: true
service: automation.turn_off
target:
entity_id: automation.turn_on_entry_lights_from_garage_entry_switch
- service: script.entry_lights_on
data: {}
- data: {}
entity_id: automation.turn_on_entry_lights_from_garage_entry_switch
service: automation.turn_on
- id: turn_off_entry_lights_garage
alias: Turn off entry lights from garage entry switch
trigger:
- platform: state
from: 'on'
to: 'off'
entity_id: input_boolean.garage_entry
action:
- data:
stop_actions: true
service: automation.turn_off
target:
entity_id: automation.turn_off_entry_lights_from_kitchen_entry_switch
- service: script.entry_lights_off
data: {}
- service: switch.turn_off
data:
entity_id: switch.hallway_overhead_5
- data: {}
entity_id: automation.turn_off_entry_lights_from_kitchen_entry_switch
service: automation.turn_on
- id: turn_off_entry_lights_kitchen
alias: Turn off entry lights from kitchen entry switch
trigger:
- platform: state
entity_id: switch.kitchen_entry_56
from: 'on'
to: 'off'
action:
- data:
stop_actions: true
service: automation.turn_off
target:
entity_id: automation.turn_off_entry_lights_from_garage_entry_switch
- service: script.entry_lights_off
data: {}
- data: {}
entity_id: automation.turn_off_entry_lights_from_garage_entry_switch
service: automation.turn_on
- id: turn_on_towel_warmer_weekday_mornings
alias: Turn on towel warmer weekday mornings
trigger:
- platform: time
at: 05:00:00
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
before: 00:00:00
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.towel_warmer_53
- id: turn_off_towel_warmer_weekday_mornings
alias: Turn off towel warmer weekday mornings
trigger:
- platform: time
at: 09:00:00
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
before: 00:00:00
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.towel_warmer_53
- id: turn_on_towel_warmer_weekend_mornings
alias: Turn on towel warmer weekend mornings
trigger:
- platform: time
at: 07:00:00
condition:
- condition: time
weekday:
- sat
- sun
before: 00:00:00
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.towel_warmer_53
- id: turn_off_towel_warmer_weekend_mornings
alias: Turn off towel warmer weekend mornings
trigger:
- platform: time
at: '12:00:00'
condition:
- condition: time
weekday:
- sat
- sun
before: 00:00:00
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.towel_warmer_53
- id: '1589936680579'
alias: turn_on_outdoor_lights_at_dusk
description: Turn on outdoor lights at dusk
trigger:
- below: '2'
entity_id: sun.sun
platform: numeric_state
value_template: '{{ state.attributes.elevation }}'
condition: []
action:
- data: {}
service: switch.turn_on
target:
entity_id:
- switch.patio_lights_49
- data: {}
entity_id: switch.patio_tree_spots_57
service: switch.turn_on
- data: {}
entity_id: light.front_porch_light_48
service: light.turn_on
enabled: true
mode: single
- id: '1589937131228'
alias: turn_off_outdoor_lights_at_bedtime
description: Turn off outdoor lights at bedtime
trigger:
- at: '23:59:00'
platform: time
condition: []
action:
- data: {}
service: switch.turn_off
target:
entity_id:
- switch.patio_lights_49
- data: {}
entity_id: switch.patio_tree_spots_57
service: switch.turn_off
- data: {}
entity_id: light.front_porch_light_48
service: light.turn_off
mode: single
- id: '1607698084703'
alias: Update Google Assistant at HA startup
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: google_assistant.request_sync
data: {}
mode: single
- id: simulate_arrival
alias: Simulate arrival
trigger:
- platform: state
entity_id: alarm_control_panel.abode_alarm
to: armed_away
- platform: sun
event: sunset
- platform: event
event_type: event_simulate_arrival
condition:
- condition: and
conditions:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: time
before: '22:00:00'
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- delay: 00:{{ (range(10, 45) | random) }}:00
- if:
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.garage_entry
- delay: 00:{{ (range(2, 10) | random) }}:00
- event: event_simulate_arrival_off
- event: event_simulate_arrival
- id: simulate_arrival_off
alias: Simulate arrival off
trigger:
- platform: event
event_type: event_simulate_arrival_off
condition:
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.garage_entry
- id: simulate_kitchen_presence
alias: Simulate kitchen presence
trigger:
- platform: state
entity_id: alarm_control_panel.abode_alarm
to: armed_away
- platform: time
at: '18:01:00'
- platform: time
at: 05:01:00
- platform: event
event_type: event_simulate_kitchen_presence
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: time
after: '18:00:00'
- condition: time
before: '22:00:00'
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
- condition: and
conditions:
- condition: time
after: 05:00:00
- condition: time
before: 09:00:00
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- service: light.turn_on
data:
entity_id: light.kitchen_pendants_9
- delay: 00:{{ (range(10, 50) | random) }}:00
- event: event_simulate_kitchen_presence_off
- delay: 00:{{ (range(2, 20) | random) }}:00
- event: event_simulate_kitchen_presence
- id: simulate_kitchen_presence_off
alias: Simulate kitchen presence off
trigger:
- platform: event
event_type: event_simulate_kitchen_presence_off
condition:
condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- service: light.turn_off
data:
entity_id: light.kitchen_pendants_9
- id: simulate_upstairs_presence
alias: Simulate upstairs presence
trigger:
- platform: state
entity_id: alarm_control_panel.abode_alarm
to: armed_away
- platform: time
at: '18:01:00'
- platform: time
at: 05:01:00
- platform: event
event_type: event_simulate_upstairs_presence
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: time
after: '18:00:00'
- condition: time
before: '23:00:00'
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
- condition: and
conditions:
- condition: time
after: 05:00:00
- condition: time
before: 09:00:00
- condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- service: switch.turn_on
data:
entity_id: switch.stairwell_lights_24
- delay: 00:{{ (range(5, 15) | random) }}:00
- event: event_simulate_upstairs_presence_off
- delay: 00:{{ (range(5, 25) | random) }}:00
- event: event_simulate_upstairs_presence
- id: simulate_upstairs_presence_off
alias: Simulate upstairs presence off
trigger:
- platform: event
event_type: event_simulate_upstairs_presence_off
condition:
condition: state
entity_id: alarm_control_panel.abode_alarm
state: armed_away
action:
- service: switch.turn_off
data:
entity_id: switch.stairwell_lights_24
- id: '1632597804453'
alias: Auto-close garage door 1
description: Auto-close garage door 1 when open for 5 minutes from 9:00PM to 7:00AM
trigger:
- platform: state
entity_id: cover.garage_door_1
to: open
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition:
- condition: time
after: '21:00:00'
before: 07:00:00
action:
- service: cover.close_cover
target:
entity_id: cover.garage_door_1
- service: notify.notify_events
data:
message: Garage door 1 automatically closed
mode: single
- id: '1632599500825'
alias: Auto-close garage door 2 when open for 5 minutes from 9:00PM to 7:00AM
description: ''
trigger:
- platform: state
entity_id: cover.garage_door_2
to: open
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition:
- condition: time
after: '21:00:00'
before: 07:00:00
action:
- service: cover.close_cover
target:
entity_id: cover.garage_door_2
- service: notify.notify_events
data:
message: Garage door 2 automatically closed
mode: single
- id: '1670800960135'
alias: Turn on humidifier when alarm is armed away
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.abode_alarm
to: armed_away
condition: []
action:
- service: script.turn_on_humidifier
data: {}
mode: single
- id: '1670801146205'
alias: Turn off humidifier when I disarm the alarm
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.abode_alarm
to: disarmed
from: armed_away
condition: []
action:
- service: script.turn_off_humidifier
data: {}
mode: single
- id: '1701036644916'
alias: Reset Kitchen Cabinet Light
description: Reset kitchen cabinet light to working scene when turned off
trigger:
- platform: device
type: turned_off
device_id: e4b724e0861282dedd32e7da64d0369d
entity_id: 0e8c23020a37770e04a5658a16f5b714
domain: light
- platform: device
type: turned_off
device_id: 9dd95867dceb79471082266db9796f4c
entity_id: 44bf0dc3f2f9af9fb929b81af3eb2061
domain: light
- platform: device
type: turned_off
device_id: 65733c61fcb51df840b5bc159becee52
entity_id: 2ff0ae5182de066e1f22111ba56578a9
domain: light
condition: []
action:
- service: pyscript.reset_light
data:
device: '{{ trigger.entity_id }}'
mode: parallel