-
Notifications
You must be signed in to change notification settings - Fork 1
/
automations.yaml
784 lines (784 loc) · 18.9 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
- id: jon_sleeping
alias: Jon Sleeping
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.jon_sleeping
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.disable_auto_presence
state: 'off'
action:
- service: scene.turn_on
entity_id: scene.all_off
- id: remote_input_select
alias: Harmony Activity
trigger:
platform: state
entity_id: input_select.harmony
from: Select Input
action:
- service: remote.turn_on
entity_id: remote.living_room
data_template:
activity: "{% if is_state(\"input_select.harmony\", \"nVidia Shield\") %}\n\
\ 22486705\n{% elif is_state(\"input_select.harmony\", \"Play XBox One\"\
) %}\n 6761513\n{% elif is_state(\"input_select.harmony\", \"Control PS4\"\
) %}\n 15118032\n{% else %} {% endif %}\n"
- service: input_select.select_option
entity_id: input_select.harmony
data_template:
option: Select Input
- id: remote_off
alias: Harmony Off
trigger:
platform: state
entity_id: input_select.harmony
to: Power Off
action:
- service: remote.turn_off
entity_id: remote.living_room
- service: input_select.select_option
entity_id: input_select.harmony
data_template:
option: Select Input
- id: update_available
alias: Update Available Notifications
trigger:
platform: state
entity_id: updater.updater
action:
service: notify.notify
data:
message: Update for Home Assistant is available.
- id: zwave_heal
alias: HEAL Z-Wave
trigger:
platform: time
at: 03:00:00
action:
service: zwave.heal_network
- id: ring_video_download
alias: Ring Video Download
trigger:
platform: template
value_template: '{{ is_state_attr(''sensor.ring_front_door_horseshoe_cct_last_activity'',
''recording_status'', ''ready'') }}'
action:
service: downloader.download_file
data_template:
url: '{{ states.camera.front_door_horseshoe_cct.attributes.video_url }}'
filename: latest.mp4
overwrite: true
- action:
- data:
entity_id: light.office
service: light.turn_on
alias: Office Movement
condition:
- condition: state
entity_id: input_boolean.disable_auto_motion
state: 'off'
id: '1514259705438'
trigger:
- entity_id: binary_sensor.motion_sensor_158d0001d92086
from: 'off'
platform: state
to: 'on'
- action:
- data:
entity_id: light.bedroom
service: light.toggle
alias: Button Click
condition: []
id: '1514290548948'
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_158d0001d8dbde
event_type: click
platform: event
- action:
- data:
entity_id: switch.air_conditioner
service: switch.toggle
alias: Button Double Click
condition: []
id: '1514290548958'
trigger:
- event_data:
click_type: double
entity_id: binary_sensor.switch_158d0001d8dbde
event_type: click
platform: event
- action:
- data:
entity_id: group.all_lights
service: light.turn_off
alias: Button Long Click
condition: []
id: '1514290548968'
trigger:
- event_data:
click_type: long_click_press
entity_id: binary_sensor.switch_158d0001d8dbde
event_type: click
platform: event
- action:
- data:
entity_id: switch.air_conditioner
service: switch.turn_off
alias: Aircon Auto Off
condition:
- below: '26'
condition: numeric_state
entity_id: sensor.netatmo_outdoor_temperature
id: '1514418240105'
trigger:
- below: '22'
entity_id: sensor.netatmo_indoor_temperature
platform: numeric_state
- action:
- data:
color_name: red
entity_id: light.gateway_light_7811dc6c8ece
service: light.turn_on
- data:
entity_id: media_player.kitchen_speaker
language: en
message: Your garage door is open
service: tts.google_translate_say
alias: Garage Door Open
condition: []
id: '1514460392129'
trigger:
- entity_id: binary_sensor.garage_door
platform: state
to: 'on'
- action:
- data:
entity_id: light.gateway_light_7811dc6c8ece
service: light.turn_off
- data:
entity_id: media_player.kitchen_speaker
language: en
message: Your garage door is closed
service: tts.google_translate_say
alias: Garage Door Close
condition:
- condition: state
entity_id: light.gateway_light_7811dc6c8ece
state: 'on'
id: '1514460504406'
trigger:
- entity_id: binary_sensor.garage_door
platform: state
to: 'off'
- action:
- service: light.turn_on
alias: Smoke Sensor
condition: []
id: '1514537836789'
trigger:
- entity_id: binary_sensor.smoke_sensor_158d0001a93896
platform: state
to: 'on'
- action:
- data:
entity_id: media_player.kitchen_speaker
language: en
message: The glass door is open.
service: tts.google_translate_say
alias: Door Open - Rear Glass
condition: []
id: '1514691811019'
trigger:
- entity_id: binary_sensor.glass_door_sensor
platform: state
to: 'on'
- action:
- data:
entity_id: media_player.kitchen_speaker
language: en
message: The laundry door is open
service: tts.google_translate_say
alias: Door Open - Laundry
condition: []
id: '1514695326727'
trigger:
- entity_id: binary_sensor.door_window_sensor_158d0001c2e60e
from: 'off'
platform: state
to: 'on'
- id: '1514769892807'
alias: Double Switch Left
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.wall_switch_left_158d0001641a34
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
entity_id: light.kitchen
service: light.toggle
- data:
entity_id: light.coffee_table
service: light.toggle
- id: '1514770297578'
alias: Double Switch Right
trigger:
- event_data:
entity_id: binary_sensor.wall_switch_right_158d0001641a34
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
entity_id: light.dining_table
service: light.toggle
- data:
entity_id: light.rear
service: light.toggle
- action:
- data:
entity_id: switch.air_conditioner
service: switch.turn_on
alias: Aircon Auto On
condition:
- above: '26'
condition: numeric_state
entity_id: sensor.netatmo_outdoor_temperature
id: '1515157255562'
trigger:
- above: '26'
entity_id: sensor.netatmo_indoor_temperature
platform: numeric_state
- id: '1515203883015'
alias: Alarm Triggered
trigger:
- entity_id: alarm_control_panel.home_alarm
platform: state
to: triggered
condition: []
action:
- data:
message: Alarm Triggered!
title: ALARM! Your alarm has been triggered.
service: notify.notify
- data:
brightness_pct: 100
entity_id: group.all_lights
service: light.turn_on
- data:
gw_mac: 7811DC6C8ECE
ringtone_id: 20
ringtone_vol: 100
service: xiaomi_aqara.play_ringtone
- data:
message: Alarm Triggered!
title: ALARM! Your alarm has been triggered.
service: notify.pb
- action:
- data:
entity_id: alarm_control_panel.home_alarm
service: alarm_control_panel.alarm_trigger
alias: Alarm Triggers Home
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
id: '1515204792836'
trigger:
- entity_id: binary_sensor.door_window_sensor_158d0001c2e60e
platform: state
to: 'on'
- entity_id: binary_sensor.door_window_sensor_158d0001fd6e59
platform: state
to: 'on'
- entity_id: binary_sensor.glass_door_sensor
platform: state
to: 'on'
- entity_id: binary_sensor.garage_door
platform: state
to: 'on'
- entity_id: binary_sensor.door_window_sensor_158d00020193e4
platform: state
to: 'on'
- action:
- data:
entity_id: alarm_control_panel.home_alarm
service: alarm_control_panel.alarm_trigger
alias: Alarm Triggers Away
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
id: '1515204792816'
trigger:
- entity_id: binary_sensor.door_window_sensor_158d0001c2e60e
platform: state
to: 'on'
- entity_id: binary_sensor.motion_sensor_158d0001d92086
platform: state
to: 'on'
- entity_id: binary_sensor.motion_sensor_158d0001e08ece
platform: state
to: 'on'
- entity_id: binary_sensor.aeotec_zw100_multisensor_6_sensor
platform: state
to: 'on'
- entity_id: binary_sensor.aeotec_zw100_multisensor_6_usb_sensor
platform: state
to: 'on'
- entity_id: binary_sensor.glass_door_sensor
platform: state
to: 'on'
- entity_id: binary_sensor.garage_door
platform: state
to: 'on'
- entity_id: binary_sensor.door_window_sensor_158d0001fd6e59
platform: state
to: 'on'
- entity_id: binary_sensor.door_window_sensor_158d00020193e4
platform: state
to: 'on'
- id: '1515663327938'
alias: Bathroom Movement Day
trigger:
- entity_id: binary_sensor.motion_sensor_158d00015a83dd
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: above_horizon
action:
- data:
brightness_pct: 100
color_temp: 370
entity_id: light.bathroom
service: light.turn_on
- id: '1515663327939'
alias: Bathroom Movement Night
trigger:
- entity_id: binary_sensor.motion_sensor_158d00015a83dd
platform: state
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- data:
brightness_pct: 10
color_temp: 154
entity_id: light.bathroom
service: light.turn_on
- id: '1515663851708'
alias: Water Leak Detected
trigger:
- entity_id: binary_sensor.water_leak_sensor_158d0001c34822
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: light.laundry
service: light.turn_on
- data:
message: Water Leak!
title: A water leak has been detected in the laundry.
service: notify.notify
- data:
entity_id: media_player.kitchen_speaker
message: A water leak has been detected in the laundry please check on it immediately!
service: tts.google_translate_say
- data:
entity_id: switch.plug_158d00019d0f86
service: switch.turn_off
- data:
message: Water Leak!
title: A water leak has been detected in the laundry.
service: notify.pb
- id: '1521148590273'
alias: Vacuum while at work
trigger:
- entity_id: device_tracker.jon_mobile_2
platform: state
to: Work
condition:
- after: 08:00
before: '10:30'
condition: time
action:
- data:
entity_id: vacuum.xiaomi_vacuum_cleaner
service: vacuum.start
- id: '1526219825995'
alias: Jon Waking Up
trigger:
- entity_id: input_boolean.jon_sleeping
from: 'on'
platform: state
to: 'off'
condition:
- above: '50'
condition: numeric_state
entity_id: sensor.aeotec_zw100_multisensor_6_usb_luminance
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.open_cover
- id: '1526899238902'
alias: Curtain Close Sunset
trigger:
- event: sunset
offset: -00:30:00
platform: sun
condition:
- condition: state
entity_id: cover.curtain_158d0001ef4394_2
state: open
- below: '23'
condition: numeric_state
entity_id: sensor.kitchen_temperature
- above: '0'
condition: numeric_state
entity_id: sensor.comparison_temperature
- condition: state
entity_id: binary_sensor.jon_is_home
state: 'off'
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.close_cover
- id: '1526900784652'
alias: Curtain Close Cooling
trigger:
- above: '23'
entity_id: sensor.kitchen_temperature
platform: numeric_state
condition:
- below: '0'
condition: numeric_state
entity_id: sensor.comparison_temperature
- condition: state
entity_id: binary_sensor.jon_is_home
state: 'off'
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.close_cover
- id: '1526901262371'
alias: Curtain Close Heating
trigger:
- below: '30'
entity_id: ' sensor.aeotec_zw100_multisensor_6_usb_luminance'
for: 0:20:00
platform: numeric_state
condition:
- condition: state
entity_id: cover.curtain_158d0001ef4394_2
state: open
- above: '0'
condition: numeric_state
entity_id: sensor.comparison_temperature
- condition: state
entity_id: binary_sensor.jon_is_home
state: 'off'
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.close_cover
- id: '1528695583677'
alias: Bedroom Movement Day
trigger:
- entity_id: sensor.aeotec_multisensor_motion_template_2
platform: state
to: motion detected
condition:
- after: sunrise
before: sunset
condition: sun
- condition: state
entity_id: input_boolean.jon_sleeping
state: 'off'
action:
- data:
brightness_pct: '60'
color_temp: 370
entity_id: light.bedroom
service: light.turn_on
- id: '1528695583678'
alias: Bedroom Movement Night
trigger:
- entity_id: sensor.aeotec_multisensor_motion_template_2
platform: state
to: motion detected
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: state
entity_id: input_boolean.jon_sleeping
state: 'off'
action:
- data:
brightness_pct: '20'
color_temp: 154
entity_id: light.bedroom
service: light.turn_on
- id: '1528695583679'
alias: Bedroom Movement Sleeping
trigger:
- entity_id: sensor.aeotec_multisensor_motion_template_2
platform: state
to: motion detected
condition:
- condition: state
entity_id: input_boolean.jon_sleeping
state: 'on'
action: []
- id: '1528695981619'
alias: Bedroom No Movement
trigger:
- entity_id: sensor.aeotec_multisensor_motion_template_2
platform: state
to: standby
condition: []
action:
- data:
entity_id: light.bedroom
service: light.turn_off
- id: '1528705374761'
alias: Garage Auto Open
trigger:
- entity_id: binary_sensor.door_window_sensor_158d00020193e4
platform: state
to: 'on'
condition:
- after: 07:00
before: '10:00'
condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: binary_sensor.garage_door
state: 'off'
- condition: zone
entity_id: device_tracker.jon_mobile_2
zone: zone.home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- data:
entity_id: switch.garage_door
service: switch.turn_on
- data:
entity_id: media_player.kitchen_speaker
message: Enjoy your day. Opening the garage door!
service: tts.google_translate_say
- id: '1528705714166'
alias: Garage Door Auto Close
trigger:
- entity_id: binary_sensor.door_window_sensor_158d00020193e4
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.garage_door
state: 'on'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- data:
entity_id: switch.garage_door
service: switch.turn_off
- data:
entity_id: media_player.kitchen_speaker
message: Welcome home. Closing the garage door!
service: tts.google_translate_say
- id: '1548314269286'
alias: Turn Off Jon Sleeping
trigger:
- platform: webhook
webhook_id: jon-sleeping-off
condition: []
action:
- data:
entity_id: input_boolean.jon_sleeping
service: input_boolean.turn_off
- id: '1548314269283'
alias: Turn On Jon Sleeping
trigger:
- platform: webhook
webhook_id: jon-sleeping-on
condition: []
action:
- data:
entity_id: input_boolean.jon_sleeping
service: input_boolean.turn_on
- id: '1566101430559'
alias: Entry Movement
trigger:
- entity_id: binary_sensor.motion_sensor_158d0001e08ece
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: input_boolean.jon_sleeping
state: 'off'
- after: sunrise
before: sunset
condition: sun
action:
- data:
brightness: 255
color_temp: 327
entity_id: light.entry_light_level
service: light.turn_on
- id: '1566101796883'
alias: Entry Movement Evening
trigger:
- entity_id: binary_sensor.motion_sensor_158d0001e08ece
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: input_boolean.jon_sleeping
state: 'off'
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- data:
brightness: 255
entity_id: light.entry_light_level
xy_color:
- 0.542
- 0.392
service: light.turn_on
- id: '1566103182554'
alias: Entry No Movement
trigger:
- entity_id: binary_sensor.motion_sensor_158d0001e08ece
for: 0:00:10
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: light.entry_light_level
service: light.turn_off
- id: '1566104438413'
alias: Bathroom No Movement
trigger:
- entity_id: binary_sensor.motion_sensor_158d00015a83dd
for: 0:0:10
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: light.bathroom
service: light.turn_off
- id: '1566104567444'
alias: Office No Movement
trigger:
- entity_id: binary_sensor.motion_sensor_158d0001d92086
for: 0:00:10
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: light.office
service: light.turn_off
- id: '1566218787474'
alias: Integra Off
trigger:
- entity_id: media_player.integra
from: 'on'
platform: state
to: 'off'
condition:
- after: sunset
before: sunrise
condition: sun
action:
- data:
brightness_pct: 30
entity_id: light.rear
service: light.turn_on
- id: '1566453216930'
alias: Curtain Switch Left
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.wall_switch_left_158d0001e11835
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.close_cover
- id: '1566453216931'
alias: Curtain Switch Right
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.wall_switch_right_158d0001e11835
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.open_cover
- id: '1566453216932'
alias: Curtain Switch Both
trigger:
- event_data:
click_type: both
entity_id: binary_sensor.wall_switch_both_158d0001e11835
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
entity_id: cover.curtain_158d0001ef4394_2
service: cover.stop_cover
- id: '1566571059383'
alias: Integra Off
trigger:
- entity_id: media_player.integra
platform: state
to: 'off'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- data:
brightness_pct: 30
entity_id: light.rear
service: light.turn_on