-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathautomations.yaml
820 lines (820 loc) · 19.4 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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
- id: atSunset
alias: AtSunset
initial_state: true
trigger:
platform: sun
event: sunset
offset: -00:00:00
action:
service: scene.turn_on
entity_id: scene.AtSunset
- id: hourBeforeSunset
alias: HourBeforeSunset
initial_state: true
trigger:
platform: sun
event: sunset
offset: -01:00:00
action:
service: scene.turn_on
entity_id: scene.hour_before_sunset
- id: atSunrise
alias: AtSunrise
trigger:
- platform: sun
event: sunrise
offset: -00:00:00
action:
- service: scene.turn_on
data: {}
target:
entity_id: scene.atsunrise
initial_state: true
- id: StartWaterHeater0600
alias: Start water heater
description: Start hot water re-circulator so there is warm water
trigger:
- platform: time
at: 06:00:00
- platform: state
entity_id: input_button.hot_water
- platform: state
entity_id: binary_sensor.master_bath_toilet_motion
to: 'on'
- platform: state
entity_id: binary_sensor.master_bath_motion
to: 'on'
action:
- service: timer.start
data:
duration: '0'
target:
entity_id: timer.water_heater
initial_state: true
- id: MasterBathMotionStarts
alias: Master bath motion starts
description: Start the hot water timer when there is motion in the bathroom
trigger:
- platform: state
entity_id: binary_sensor.master_bath_toilet_motion
to: 'on'
action:
- service: timer.start
data: {}
target:
entity_id: timer.water_heater
initial_state: true
- id: WaterHeaterTimerEnds
alias: Water Heater timer ends
description: Turn off the hot water re-circulator when the timer ends
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.water_heater
action:
- service: switch.turn_off
entity_id: switch.water_heater_outlet
initial_state: true
- id: ClimateEnabled
alias: Climate Enabled
description: Turn on heat/air and close the skylight.
trigger:
- entity_id: input_boolean.enable_climate
platform: state
to: 'on'
action:
- data:
entity_id: climate.central
hvac_mode: heat_cool
service: climate.set_hvac_mode
- data:
fan_mode: Auto low
service: climate.set_fan_mode
target:
entity_id: climate.central
- data: {}
service: cover.close_cover
target:
entity_id:
- cover.master_bath_skylight_switch
- cover.master_windows
initial_state: true
mode: single
- id: ClimateDisabled
alias: Climate Disabled
description: Actions taken when the central HVAC is turned off.
trigger:
- platform: state
entity_id: input_boolean.enable_climate
to: 'off'
action:
- service: climate.set_hvac_mode
data:
entity_id: climate.central
hvac_mode: 'off'
- service: climate.set_hvac_mode
data:
hvac_mode: cool
target:
entity_id: climate.master_bedroom
initial_state: true
mode: single
- id: Climate_0100
alias: Climate 0100
trigger:
- at: 01:00:00
platform: time
action:
- data:
entity_id: climate.central
target_temp_high: 75
target_temp_low: 62
service: climate.set_temperature
initial_state: true
- id: Climate_0600
alias: Climate 0600
trigger:
- at: 06:00:00
platform: time
action:
- data:
entity_id: climate.central
target_temp_high: 77
target_temp_low: 71
service: climate.set_temperature
initial_state: true
mode: single
- id: Climate_2000
alias: Climate 2000
trigger:
- at: '20:00:00'
platform: time
action:
- data:
target_temp_high: 76
target_temp_low: 62
service: climate.set_temperature
target:
entity_id: climate.central
initial_state: true
mode: single
- id: AtMidnight
alias: AtMidnight
initial_state: true
trigger:
platform: time
at: 00:00:00
action:
service: scene.turn_on
entity_id: scene.AtMidnight
- id: At0630
alias: At0630
trigger:
- at: 06:30:00
platform: time
action:
- entity_id: scene.At0630
service: scene.turn_on
- data:
fan_mode: Auto low
service: climate.set_fan_mode
target:
entity_id: climate.central
initial_state: true
mode: single
- id: At0800
alias: At0730
trigger:
- at: 07:30:00
platform: time
action:
- entity_id: scene.at0730
service: scene.turn_on
initial_state: true
mode: single
- id: AtNoon
alias: AtNoon
initial_state: true
trigger:
platform: time
at: '12:00:00'
action:
service: scene.turn_on
entity_id: scene.AtNoon
- id: At8PM
alias: At2000
trigger:
- at: '20:00:00'
platform: time
action:
- entity_id: scene.At8PM
service: scene.turn_on
initial_state: true
mode: single
- id: AlarmDisarmedDaytime
alias: 'Alarm: Disarmed Daytime'
trigger:
- entity_id: alarm_control_panel.home1
platform: state
not_from: unavailable
to: disarmed
condition:
- before: sunset
condition: sun
action:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- entity_id: scene.OnDisarmedDaytime
service: scene.turn_on
initial_state: true
mode: single
- id: AlarmDisarmedNighttime
alias: 'Alarm: Disarmed Nighttime'
trigger:
- platform: state
entity_id: alarm_control_panel.home1
not_from: unavailable
to: disarmed
condition:
- condition: sun
after: sunset
action:
- service: scene.turn_on
data: {}
target:
entity_id: scene.ondisarmednighttime
initial_state: true
mode: single
- id: AlarmArmedAway
alias: 'Alarm: Armed Away'
trigger:
- platform: state
entity_id: alarm_control_panel.home1
not_from: unavailable
to: armed_away
action:
- service: media_player.media_stop
data: {}
target:
entity_id:
- media_player.sonos_office
- media_player.sonos_living_room
- media_player.sonos_kid
- media_player.master_bedroom_apple_tv
- media_player.living_room_apple_tv
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: scene.turn_on
data: {}
target:
entity_id:
- scene.outside_lights_off
- scene.onarmedaway
- service: lock.lock
data: {}
target:
entity_id: lock.kitchen_door_lock
initial_state: true
mode: single
- id: AlarmArmedStayDaytime
alias: 'Alarm: Armed Stay Daytime'
trigger:
- platform: state
entity_id: alarm_control_panel.home1
not_from: unavailable
to: armed_home
condition:
- condition: sun
before: sunset
action:
- delay: 120
- service: scene.turn_on
data: {}
target:
entity_id: scene.onarmedstaydaytime
- service: lock.lock
data: {}
target:
entity_id: lock.kitchen_door_lock
initial_state: true
mode: single
- id: RainDelayManuallyTriggered
alias: Rain Delay manually triggered
initial_state: true
trigger:
platform: state
entity_id: input_boolean.rain_delay
to: 'on'
action:
- service: timer.start
entity_id: timer.rain_delay
- id: RainDelayTimerEnds
alias: Rain Delay timer ends
initial_state: true
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.rain_delay
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.rain_delay
- id: kitchenDoorUnlockedArmedAway
alias: Kitchen Door Unlocked while Armed Away
trigger:
- platform: state
entity_id: lock.kitchen_door_lock
to: unlocked
condition:
- condition: state
entity_id: alarm_control_panel.home1
state: armed_away
action:
- service: alarm_control_panel.alarm_disarm
data: {}
target:
entity_id: alarm_control_panel.home1
initial_state: true
mode: single
- id: KitchenDoorLockedWhileDisarmed
alias: Kitchen Door Locked while Disarmed
trigger: []
condition: []
action: []
initial_state: true
mode: single
- id: DoorbellPushedWhileAway
alias: Doorbell pushed while away
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.skybell_front_door_button
to: 'on'
condition:
condition: state
entity_id: alarm_control_panel.home1
state: armed_away
action:
service: media_player.play_media
data:
entity_id: media_player.sonos_living_room
media_content_id: http://192.168.1.196:8123/local/pitbull.mp3
media_content_type: music
- id: DoorbellPushedAfterDark
alias: Doorbell pushed after dark
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.skybell_front_door_button
to: 'on'
condition:
condition: sun
after: sunset
action:
service: homeassistant.turn_on
entity_id: switch.front_entry_light_switch
- id: WaterPlants
alias: Water Plants
trigger:
- platform: time
at: 06:30:00
condition:
- condition: and
conditions:
- condition: time
weekday:
- mon
- wed
- sat
before: 00:00:00
- condition: state
entity_id: input_boolean.rain_delay
state: 'off'
action:
- service: scene.turn_on
entity_id: scene.WaterPlants
initial_state: true
- id: WaterFrontLawn
alias: Water Front Lawn
trigger:
- platform: time
at: 06:32:00
condition:
- condition: and
conditions:
- condition: time
weekday:
- wed
before: 00:00:00
- condition: state
entity_id: input_boolean.rain_delay
state: 'off'
action:
- service: scene.turn_on
entity_id: scene.WaterLawn
initial_state: true
- id: stopAllWatering
alias: Stop All Watering
initial_state: true
trigger:
platform: time
at: 06:40:00
action:
service: scene.turn_on
entity_id: scene.StopAllWater
- id: WeeklySoaking
alias: Weekly Soaking
trigger:
- platform: time
at: 07:00:00
condition:
- condition: and
conditions:
- condition: time
weekday:
- sat
before: 00:00:00
- condition: state
entity_id: input_boolean.rain_delay
state: 'off'
action:
- service: switch.turn_on
entity_id: switch.back_drip_switch
initial_state: true
- id: StopWeeklySoaking
alias: Stop Weekly Soaking
initial_state: true
trigger:
platform: time
at: 07:55:00
action:
service: scene.turn_on
entity_id: scene.StopAllWater
- id: KidMotionEnds
alias: Kid motion ends
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.kid_motion
to: 'off'
action:
- service: timer.start
entity_id: timer.kid_music
- id: KidMotionStarts
alias: Kid motion starts
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.kid_motion
to: 'on'
action:
- service: timer.cancel
entity_id: timer.kid_music
- id: KidMusicTimerEnds
alias: Kid music timer ends
initial_state: true
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.kid_music
action:
- service: sonos.set_sleep_timer
data:
entity_id: media_player.sonos_kid
sleep_time: 0
- id: '1625439560442'
alias: Flag reminder at sunset
description: Remind users if a flag is outside at sunset.
trigger:
- platform: sun
event: sunrise
condition:
- condition: state
entity_id: input_boolean.flag_outside
state: 'on'
action:
- service: notify.austin
data:
message: It's sunset. Bring the flags inside.
title: Flags are outside at Sunset
- data:
delay: 00:00:03
message: Bring the flags in from the balcony.
sonos_entity: media_player.sonos_living_room
volume: 0.5
service: script.sonos_say
- service: input_boolean.turn_off
target:
entity_id: input_boolean.flag_outside
data: {}
mode: single
- id: '1641445278269'
alias: Bedtime on button double press
description: Set the Bedtime scene on double down press of the bedroom light button
use_blueprint:
path: IOT_Ninja/zooz-zen30-double-switch-automation-helper.yaml
input:
zooz_zen30: dfb6b0948b3864762f67d058c6f4168b
dimmer_down_2x:
- service: scene.turn_on
target:
entity_id: scene.bedtime
- id: '1641447432195'
alias: Master Bedroom Lamps multi-tap
description: Actions to take on multi-tap on master bedroom lamp switch
use_blueprint:
path: zooz-zen71-switch-automation-helper.yaml
input:
zooz_zen71: 8ae5bcb98b2f8d15e03f7893826481d8
switch_up_2x:
- scene: scene.outside_lights_on
switch_down_2x:
- scene: scene.bedtime
- id: '1641679319792'
alias: Garage Lights multi-tap
description: ''
use_blueprint:
path: IOT_Ninja/zooz-zen30-double-switch-automation-helper.yaml
input:
zooz_zen30: 1698a955f727fd1348d9cf0404fa5a08
dimmer_up_2x:
- scene: scene.outside_lights_on
dimmer_down_2x:
- scene: scene.outside_lights_off
- id: '1644087651554'
alias: Water Heater timer starts
description: Turn on the hot water re-circulator when the timer starts
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.water_heater
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.water_heater_outlet
mode: single
- id: '1587841836008'
alias: Laundry flood
description: If the laundry floods, announce it on Sonos.
trigger:
- entity_id: binary_sensor.laundry_strip_flood
platform: state
to: 'on'
condition: []
action:
- service: notify.adults
data:
message: The laundry area is flooded in the master bathroom.
- data:
delay: 00:00:08
message: The laundry area is flooded in the master bathroom.
sonos_entity: media_player.sonos_office
volume: 0.5
service: script.sonos_say
- data:
delay: 00:00:08
message: The laundry area is flooded in the master bathroom.
sonos_entity: media_player.sonos_living_room
volume: 0.5
service: script.sonos_say
mode: single
- id: AlarmTriggered
alias: 'Alarm: Triggered'
description: Actions taken when the Alarm is triggered for any reason (police, medical
or fire).
trigger:
- platform: state
entity_id: alarm_control_panel.home1
to: triggered
action:
- service: scene.turn_on
data: {}
target:
entity_id: scene.onalarmtriggered
- service: lock.unlock
data:
entity_id: lock.kitchen_door_lock
- service: notify.adults
data:
message: The house alarm has been triggered.
- service: cover.close_cover
data: {}
target:
entity_id: cover.master_windows
- service: cover.open_cover
data: {}
target:
entity_id: cover.master_blinds
initial_state: true
mode: single
- id: RainDelayTurnsOnWhenSkylightSensesRain
alias: Rain Delay turns on when skylight senses rain
trigger:
- platform: state
entity_id: binary_sensor.master_bath_skylight_flood
to: 'on'
- platform: state
entity_id:
- binary_sensor.master_bath_skylight_water_alarm_water_leak_detected_location_provided
to: 'on'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.rain_delay
- service: notify.adults
data:
message: 'The skylight sensed rain. Close the windows. '
title: It's raining!
- service: cover.close_cover
data: {}
target:
entity_id:
- cover.master_bath_skylight
- cover.master_windows
initial_state: true
mode: single
- id: '1645831617312'
alias: Check if car charging when low battery
description: ''
trigger:
- platform: time
at: '18:00:00'
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.xc90_plug_status
state: 'off'
- condition: numeric_state
entity_id: sensor.xc_90_battery_level
below: '75'
- condition: state
entity_id: device_tracker.volvo_yv4br0cl0n1814975
state: home
action:
- service: notify.austin
data:
title: Plug in XC90
message: It's after 6 and the car battery is low
mode: single
- id: '1648926796382'
alias: Kitchen sink flood
description: If the kitchen sink flood sensor detects water, send a notification
and announce it on Sonos.
trigger:
- entity_id: binary_sensor.kitchen_sink
platform: state
to: 'on'
condition: []
action:
- service: notify.adults
data:
message: Water leak detected under the kitchen sink.
- data:
message: Water leak detected under the kitchen sink.
sonos_entity: media_player.sonos_office
volume: 0.5
service: script.sonos_say
mode: single
- id: '1655090844282'
alias: Juicebox charge now if Sparky plugged in
description: If Sparky is plugged into the Juicebox for 5 minutes, then set Juicebox
to charge now. Sparky will not charge until midnight anyways, but will immediately
honk the horn once there is power available on the charge cable. We don't want
that to happen at midnight.
trigger:
- platform: state
entity_id:
- sensor.charging_status
to: plugged
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: state
entity_id: binary_sensor.xc90_plug_status
state: 'off'
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.charge_now
mode: single
- id: '1671399805823'
alias: Disable Master Fan when Heating
description: Disables the Master Fan when the central HVAC is in heating mode.
trigger:
- platform: state
entity_id:
- climate.central
attribute: hvac_action
to: heating
condition: []
action:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.master_bedroom
mode: single
- id: '1673802978372'
alias: Close blinds at sunset
description: Close the master blinds at sunset if the window is already closed.
trigger:
- platform: sun
event: sunset
offset: 0
condition:
- condition: state
entity_id: cover.master_windows
state: closed
action:
- service: cover.close_cover
data: {}
target:
entity_id: cover.master_blinds
mode: single
- id: '1676912078084'
alias: Dinner
description: Announce dinner on speakers
trigger:
- platform: state
entity_id:
- input_boolean.dinner
to: 'on'
condition: []
action:
- data:
delay: 00:00:08
message: Excuse me ladies and gentlemen, dinner is served.
sonos_entity: media_player.sonos_office
volume: 0.5
service: script.sonos_say
- data:
delay: 00:00:08
message: Excuse me ladies and gentlemen, dinner is served.
sonos_entity: media_player.sonos_living_room
volume: 0.5
service: script.sonos_say
- data:
delay: 00:00:08
message: Excuse me ladies and gentlemen, dinner is served.
sonos_entity: media_player.sonos_kid
volume: 0.5
service: script.sonos_say
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.dinner
mode: single
- id: '1677281191992'
alias: Lock Car
description: Locks car if home for more than 5 minutes and doors are closed.
trigger:
- platform: state
entity_id:
- device_tracker.xc90_position
to: home
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.xc90_doors
state: 'off'
- condition: state
entity_id: binary_sensor.xc90_door_lock
state: 'on'
action:
- service: lock.lock
data: {}
target:
entity_id: lock.xc90_door_lock
mode: single
- id: '1680906325496'
alias: Turn off closet light
description: Turns off master closet light after 15 minutes
use_blueprint:
path: turn_off_switch_after_time.yaml
input:
switch: switch.master_closet
time:
hours: 0
minutes: 15
seconds: 0