-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathautomations.yaml
2391 lines (2388 loc) · 66.2 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
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
- id: '1611982176739'
alias: 'System: SSL Certificate Renewal'
description: renew ssl certificate from letsencrypt.
trigger:
- at: 00:02
platform: time
condition: []
action:
- data:
addon: core_letsencrypt
action: hassio.addon_restart
mode: single
- id: '1612291452533'
alias: 'Shed: Plant Light Controls'
description: used when Rosemary plant is brought indoors during the winter.
trigger:
- platform: sun
event: sunrise
id: shed_plant_light_on
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.shed_indoor_plant_light_on
id: shed_plant_light_off
condition:
- condition: state
entity_id: input_boolean.shed_indoor_plant_light
state: 'on'
action:
- choose:
- conditions:
- condition: trigger
id:
- shed_plant_light_on
sequence:
- action: timer.start
data: {}
target:
entity_id: timer.shed_indoor_plant_light_on
- action: switch.turn_on
target:
entity_id: switch.plg_shed_utility
data: {}
- conditions:
- condition: trigger
id:
- shed_plant_light_off
sequence:
- action: switch.turn_off
target:
entity_id: switch.plg_shed_utility
data: {}
mode: single
- id: '1612292614712'
alias: 'Kitchen Speakers: ON when music starts playing'
description: ''
trigger:
- platform: state
entity_id: media_player.kitchen_speaker
to: playing
for: 00:00:01
condition:
- condition: state
state: 'off'
entity_id: switch.plg_kitchen_speaker
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.plg_kitchen_speaker
mode: single
- id: '1612292752882'
alias: 'Kitchen Speakers: Off when music no longer playing'
description: ''
trigger:
- platform: state
entity_id: media_player.kitchen_speaker
from: playing
to: idle
for: 00:00:30
- platform: state
entity_id: media_player.kitchen_speaker
to: 'off'
condition:
- condition: state
state: 'on'
entity_id: switch.plg_kitchen_speaker
action:
- action: switch.turn_off
data: {}
target:
entity_id: switch.plg_kitchen_speaker
mode: single
- id: '1612292819059'
alias: 'House: Indoor Lights on at sunset'
description: ''
triggers:
- event: sunset
trigger: sun
conditions: []
actions:
- action: light.turn_on
target:
entity_id:
- light.blb_kidsbedroom_lamp
- light.blb_main_bedroom_floor_lamp
data:
transition: 6
brightness_pct: 50
rgb_color:
- 129
- 173
- 255
- action: switch.turn_on
data: {}
target:
entity_id:
- switch.fan_family_room_airpurifier_night_mode
- switch.fan_main_bedroom_airpurifier_night_mode
- switch.plg_familyroom_cabinetlight
- switch.sw_kitchen_sinklight
- switch.family_room_garland_light
- if:
- condition: state
entity_id: input_boolean.christmas_lights_indoors
state: 'on'
then:
- action: switch.turn_on
data: {}
target:
entity_id:
- switch.sw_familyroom_christmastree
- switch.sw_familyroom_cornerlight
mode: single
- id: '1612292887886'
alias: 'House: Indoor Devices off for the night check'
description: turn off any devices that might have been left on over night.
triggers:
- at: 01:01:00
trigger: time
conditions: []
actions:
- action: switch.turn_off
data: {}
target:
entity_id:
- switch.plg_familyroom_cabinetlight
- switch.sw_kitchen_sinklight
- switch.family_room_garland_light
- action: switch.turn_on
data: {}
target:
entity_id:
- switch.garage_house_door_lock
- switch.house_front_door_lock
mode: single
- id: '1612295061627'
alias: 'Outside: Lights Off at sunrise'
description: turn off outdoor lights shortly before sunrise.
trigger:
- platform: sun
event: sunrise
offset: -00:15:00
condition: []
action:
- action: light.turn_off
target:
entity_id: light.group_driveway_lights
data:
transition: 2
- action: light.turn_off
data: {}
target:
entity_id: light.front_door_ring_light
mode: single
- id: '1612298561421'
alias: 'Main Bedroom: Climate controls'
description: ''
trigger:
- platform: time_pattern
minutes: /10
condition:
- condition: state
entity_id: input_boolean.main_bedroom_heater
state: 'on'
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: numeric_state
below: '21.1'
entity_id: sensor.main_bedroom_mean_temperature_calculation
- condition: state
entity_id: binary_sensor.main_bedroom_presence_sensor_timeout
state: 'on'
- condition: time
after: '22:00:00'
before: 05:29:00
- condition: state
entity_id: switch.sw_main_bedroom_heater
state: 'off'
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.sw_main_bedroom_heater
- conditions:
- condition: and
conditions:
- condition: time
after: 05:30:00
before: '21:59:00'
- condition: state
entity_id: switch.sw_main_bedroom_heater
state: 'on'
sequence:
- action: switch.turn_off
data: {}
target:
entity_id: switch.sw_main_bedroom_heater
default: []
mode: single
- id: '1612306243899'
alias: 'Garage Inside: Lights on when person doors opened'
description: turn on garage lights when house or side door is opened after sunset.
trigger:
- platform: state
to: 'on'
entity_id: binary_sensor.snr_garage_housedoorcontact_contact
- platform: state
entity_id: binary_sensor.snr_garage_sidedoorcontact_contact
from: 'off'
to: 'on'
condition:
- condition: and
conditions:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: state
entity_id: switch.sw_garage_ceilingmainlights
state: 'off'
for: 00:00:10
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.sw_garage_ceilingmainlights
mode: single
- id: '1612309818757'
alias: 'Garage Outside: Side light On at night with motion'
description: turn light at garage side door on when motion is detected at side of
house.
trigger:
- platform: state
entity_id: binary_sensor.snr_outside_garagesidemotion_occupancy
from: 'off'
to: 'on'
id: outside_garage_motion_on
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.outside_garage_side_door_light_on
id: outside_garage_motion_off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- outside_garage_motion_on
- condition: state
entity_id: sun.sun
state: below_horizon
sequence:
- action: timer.start
target:
entity_id: timer.outside_garage_side_door_light_on
data: {}
- action: switch.turn_on
target:
entity_id: switch.sw_outside_garagesidedoorlight
data: {}
- conditions:
- condition: trigger
id:
- outside_garage_motion_off
sequence:
- action: switch.turn_off
target:
entity_id: switch.sw_outside_garagesidedoorlight
data: {}
mode: restart
- id: '1612462343806'
alias: 'Garage Inside: Dehumidifier off when vehicle door opened'
description: turn off dehumidifier when garage vehicle door is opened.
trigger:
- platform: state
entity_id: switch.sw_garage_vehicledoorcontact
from: 'off'
to: 'on'
for: 00:00:20
condition:
- condition: state
entity_id: switch.plg_garage_dehumidifier
state: 'on'
action:
- action: switch.turn_off
data: {}
target:
entity_id: switch.plg_garage_dehumidifier
mode: single
- id: '1612462859674'
alias: 'Garage Inside: Dehumidifier check when vehicle door closes'
description: ''
trigger:
- platform: state
entity_id: switch.sw_garage_vehicledoorcontact
from: 'on'
to: 'off'
for: 00:00:20
condition:
- condition: and
conditions:
- condition: numeric_state
above: '65.0'
entity_id: sensor.garage_mean_humidity_calculation
- condition: state
entity_id: switch.plg_garage_dehumidifier
state: 'off'
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.plg_garage_dehumidifier
mode: single
- id: '1612463000537'
alias: 'Garage Inside: Dehumidifier on with high humidity'
description: check garage humidity every 10 minutes and turn on dehumidifier if
humidity has risen above 65% RH
trigger:
- platform: time_pattern
minutes: /10
condition:
- condition: numeric_state
above: '65.0'
entity_id: sensor.garage_mean_humidity_calculation
- condition: and
conditions:
- condition: state
entity_id: switch.plg_garage_dehumidifier
state: 'off'
- condition: state
entity_id: switch.sw_garage_vehicledoorcontact
state: 'off'
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.plg_garage_dehumidifier
mode: single
- id: '1612463100433'
alias: 'Garage Inside: Dehumidifier off with low humidity'
description: check garage humidity every 15 minutes and turn off dehumidifier if
humidity has dropped below 61% RH
trigger:
- platform: time_pattern
minutes: /15
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.garage_mean_humidity_calculation
below: '61.0'
- condition: state
entity_id: switch.plg_garage_dehumidifier
state: 'on'
for:
hours: 1
minutes: 0
seconds: 0
action:
- action: switch.turn_off
data: {}
target:
entity_id: switch.plg_garage_dehumidifier
mode: single
- id: '1613012241426'
alias: 'Office: Air Purifier on with occupancy'
description: ''
triggers:
- trigger: device
domain: mqtt
device_id: ac1685c3f906b6d35a73dd2e5a7ce265
type: action
subtype: tilt
id: tilt
conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.office_presence_sensor_timeout
state: 'on'
- condition: state
entity_id: switch.plg_office_airpurifier
state: 'off'
actions:
- action: switch.turn_on
data: {}
target:
entity_id: switch.plg_office_airpurifier
mode: restart
- id: '1613012339822'
alias: 'Office: Air Purifier off when room is empty'
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.office_presence_sensor_presence
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
condition:
- condition: and
conditions:
- condition: state
entity_id: switch.plg_office_airpurifier
state: 'on'
- condition: numeric_state
entity_id: sensor.snr_outside_airquality_aqi
below: 100
- condition: numeric_state
entity_id: sensor.indoor_mean_air_quality_calculation
below: 10
action:
- action: switch.turn_off
data: {}
target:
entity_id: switch.plg_office_airpurifier
mode: single
- id: '1613958937211'
alias: 'House: Nofity if water leak detected'
description: send notification to everyone, including the TV, if water leak is detected.
trigger:
- platform: state
entity_id: binary_sensor.group_leak_sensors
to: 'on'
condition: []
action:
- action: notify.grp_anne_chris_phones
data:
title: "❗\U0001F4A7 Water Detected"
message: Water detected at {{ triggered_leak_sensor }} sensor.
data:
push:
sound:
name: default
critical: 1
volume: 1
- action: notify.grp_all_tvs
data:
message: ALERT! Water detected at {{ triggered_leak_sensor }} sensor.
variables:
triggered_leak_sensor: "{% for entity in trigger.to_state.attributes.entity_id
%}\n {% if is_state(entity, 'on') %}\n {{ state_attr(entity, 'friendly_name')
}}\n {% endif %}\n{% endfor %}\n"
mode: single
- id: '1616274628046'
alias: 'Kitchen: Espresso Machine On in the morning'
description: turn on the espresso machine in the morning (between 05:00 - 10:00)
when chris' iphone is removed from the charger for 1 minute.
trigger:
- platform: state
entity_id:
- sensor.turraphone_battery_state
to: Not Charging
for:
hours: 0
minutes: 1
seconds: 0
- platform: state
entity_id:
- sensor.toothbrush_chris_toothbrush_state
to: running
for:
hours: 0
minutes: 0
seconds: 10
condition:
- condition: and
conditions:
- condition: state
state: home
entity_id: device_tracker.turraphone
- condition: time
before: '10:00:00'
after: 05:00:00
- condition: state
state: 'off'
entity_id: switch.plg_kitchen_espressomachine
action:
- action: switch.turn_on
target:
entity_id: switch.plg_kitchen_espressomachine
data: {}
mode: single
- id: '1616875296550'
alias: 'Crawlspace: Notify when locker door opened'
description: when locker door is opened notify chris' iphone.
trigger:
- platform: state
to: 'on'
for: 00:00:02
entity_id: binary_sensor.snr_crawlspace_lockerdoorcontact_contact
condition: []
action:
- action: notify.mobile_app_turraphone
data:
title: "❗\U0001F6AA Locker Door Open"
message: Locker Door has been opened
data:
push:
sound:
name: default
critical: 1
volume: 1
mode: single
- id: '1617333806988'
alias: 'Shed: Flood Light on at night with motion'
description: turn on shed flood light 15 minutes after sun is below the horizon
and keep on for 5 minutes after motion is no longer detected.
trigger:
- platform: state
to: 'on'
entity_id: binary_sensor.snr_outside_shedmotion_occupancy
id: outside_shed_floodlight_on
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.outside_shed_flood_light_on
id: outside_shed_floodlight_off
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
for: 00:15:00
action:
- choose:
- conditions:
- condition: trigger
id:
- outside_shed_floodlight_on
sequence:
- action: timer.start
target:
entity_id: timer.outside_shed_flood_light_on
data: {}
- action: switch.turn_on
target:
entity_id: switch.sw_shed_floodlight
data: {}
- conditions:
- condition: trigger
id:
- outside_shed_floodlight_off
sequence:
- action: switch.turn_off
target:
entity_id: switch.sw_shed_floodlight
data: {}
mode: restart
- id: '1619640982634'
alias: 'Shed: Notify when door left open at night'
description: notify chris' phone if either shed door is left open for 5 minutes
when the time is after 22:30.
trigger:
- platform: time_pattern
minutes: /10
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.group_shed_doors
state: 'on'
for:
hours: 0
minutes: 5
seconds: 0
- condition: time
after: '22:30:00'
action:
- action: notify.mobile_app_turraphone
data:
message: '{{ triggered_door_sensor }} has been left open'
title: "❗\U0001F6AA Shed Door Open"
data:
push:
sound:
name: default
critical: 1
volume: 1
variables:
triggered_door_sensor: "{% for entity in states.binary_sensor.group_shed_doors.attributes.entity_id
%}\n {% if is_state(entity,'on') %}\n {{ state_attr(entity, 'friendly_name')
}}\n {% endif %}\n{% endfor %}\n"
mode: single
- id: '1619814582936'
alias: 'Shed: Fan on when door is opened'
description: turn on shed exhaust fan for 10 minutes when the door is opened.
trigger:
- platform: state
entity_id: binary_sensor.snr_shed_doorcontact_contact
from: 'off'
to: 'on'
condition:
- condition: and
conditions:
- condition: state
entity_id: switch.sw_shed_fan
state: 'off'
- condition: numeric_state
entity_id: sensor.snr_outside_temperature
above: 0
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.sw_shed_fan
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- action: switch.turn_off
data: {}
target:
entity_id: switch.sw_shed_fan
mode: single
- id: '1623889405239'
alias: 'Garage Inside: Offer to open vehicle door on return home'
description: notify chris' phone when it returns home from away and offer to open
the garage door.
trigger:
- platform: state
entity_id: device_tracker.turraphone
from: not_home
to: home
condition:
- condition: state
entity_id: switch.sw_garage_vehicledoorcontact
state: 'off'
action:
- action: notify.mobile_app_turraphone
data:
title: Welcome Home!
message: Would you like to open the Garage Door?
data:
actions:
- action: OPEN_DOOR
title: Yes Please
- action: NO_ACTION
title: No Thanks
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: OPEN_DOOR
timeout: 00:02:00
continue_on_timeout: false
- action: cover.open_cover
target:
entity_id: cover.garage_vehicledoor
mode: single
- id: '1624131994582'
alias: 'Garage Inside: notify Chris when vehicle door opened'
description: send a notification to chris' phone, including a dynamic image, when
the garage door has been opened.
triggers:
- entity_id: switch.sw_garage_vehicledoorcontact
from: 'off'
to: 'on'
for: 00:00:10
trigger: state
conditions: []
actions:
- action: notify.mobile_app_turraphone
data:
title: "\U0001F6AA Garage Door"
message: The Garage Door has been opened.
data:
entity_id: camera.cam_garage
mode: single
- id: '1630907999593'
alias: 'Garage Inside: HVAC update outside temperature'
description: publish outdoor temperature and time to thermostat mqtt topic
trigger:
- platform: time_pattern
minutes: /10
condition: []
action:
- data:
topic: zigbee2mqtt-pi/HVAC_Garage_Thermostat/set/thermostat_outdoor_temperature
payload: '{{ states("sensor.snr_outside_temperature") }}'
action: mqtt.publish
- data:
topic: zigbee2mqtt-pi/HVAC_Garage_Thermostat/set/thermostat_time
payload: ''
action: mqtt.publish
mode: restart
- id: '1631040582872'
alias: 'Garage Inside: HVAC off when vehicle door opened'
description: turn heating mode off on thermostat every time door is opened if outside
temp is lower than 11c to ensure heater doesn't turn on while vehicle door is
open.
triggers:
- entity_id: switch.sw_garage_vehicledoorcontact
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 2
trigger: state
conditions:
- condition: numeric_state
entity_id: sensor.snr_outside_temperature
below: '11'
actions:
- action: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.hvac_garage_thermostat
mode: single
- id: '1631040781299'
alias: 'Garage Inside: HVAC on when vehicle door closed'
description: wait a couple mins after vehicle door closes to ensure temp normalizes,
if current is below target temp, before returning the thermostat to heating mode.
triggers:
- entity_id: switch.sw_garage_vehicledoorcontact
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 2
trigger: state
conditions:
- condition: state
entity_id: climate.hvac_garage_thermostat
state: 'off'
actions:
- delay:
hours: 0
minutes: "{% set current_temp = state_attr('climate.hvac_garage_thermostat','current_temperature')
%} {% set target_temp = state_attr('climate.hvac_garage_thermostat','temperature')
%} {% if is_number(current_temp) and is_number(target_temp) %}\n {% set temp_diff
= current_temp | float - target_temp | float %}\n {# delay if temp diff is
lower to give room time for normalization #}\n {% if (temp_diff >= 3.0) %}\n
\ 0\n {% elif (temp_diff < 3.0) and (temp_diff > 0.0) %}\n 3\n {% else
%}\n 6\n {% endif %}\n{% else %}\n {# non-numeric number returned. set
a longer delay to be safe #}\n 6\n{% endif %}\n"
seconds: 0
milliseconds: 0
- action: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.hvac_garage_thermostat
mode: restart
- id: '1631739108301'
alias: 'Garage Inside: Notify when vehicle door left open at night'
description: notify chris' phone if the vehicle door is left open for 5 minutes
when the time is after 22:30.
triggers:
- minutes: /10
trigger: time_pattern
conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.sw_garage_vehicledoorcontact
state: 'on'
for: 00:05:00
- condition: time
after: '22:30:00'
actions:
- action: notify.mobile_app_turraphone
data:
message: Garage Vehicle Door has been left open
title: "❗\U0001F6AA Garage Vehicle Door Open"
data:
push:
sound:
name: default
critical: 1
volume: 1
mode: single
- id: '1634070537275'
alias: 'Crawlspace: Locker climate controls'
description: ''
trigger:
- platform: time_pattern
hours: /1
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.plg_crawlspace_zbrtr
state: 'on'
- condition: numeric_state
entity_id: sensor.snr_crawlspace_locker_climatedisplay_humidity
below: '49.0'
sequence:
- action: switch.turn_off
data: {}
target:
entity_id: switch.plg_crawlspace_zbrtr
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.plg_crawlspace_zbrtr
state: 'off'
- condition: numeric_state
entity_id: sensor.snr_crawlspace_locker_climatedisplay_humidity
above: '52.0'
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.plg_crawlspace_zbrtr
default: []
mode: single
- id: '1634077407692'
alias: 'House: Announce if water leak detected'
description: Announce on Sonos speakers if water leak is detected.
trigger:
- platform: state
entity_id: binary_sensor.group_leak_sensors
to: 'on'
condition: []
action:
- repeat:
count: '3'
sequence:
- action: script.text_to_speech_on_sonos
data:
entity_id: media_player.main_bedroom_speaker, media_player.family_room_speaker
volume_level: 0.8
min_wait: 1
message: ALERT. Water detected at {{ triggered_leak_sensor }} sensor.
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
variables:
triggered_leak_sensor: "{% for entity in trigger.to_state.attributes.entity_id
%}\n {% if is_state(entity, 'on') %}\n {{ state_attr(entity, 'friendly_name')
}}\n {% endif %}\n{% endfor %}\n"
mode: single
- id: '1634327400385'
alias: 'Porch: Lights Off at midnight'
description: turn porch lights off at midnight.
trigger:
- platform: time
at: '23:59:00'
condition: []
action:
- action: light.turn_off
data:
transition: 2
target:
entity_id: light.group_porch_lights
mode: single
- id: '1635620369445'
alias: 'Crawlspace: Entrance light ON when door opened'
description: turn on crawlspace entrance lights when door is opened.
trigger:
- platform: state
from: 'off'
to: 'on'
entity_id: binary_sensor.snr_crawlspace_entrancedoorcontact_contact
condition:
- condition: state
entity_id: switch.sw_crawlspace_entrancelight
state: 'off'
for:
hours: 0
minutes: 0
seconds: 10
action:
- action: switch.turn_on
target:
entity_id: switch.sw_crawlspace_entrancelight
mode: single
- id: '1638686806697'
alias: 'Garage Inside: Lights on when vehicle doors opened after sunset'
description: turn on garage lights when vehicle door is opened after sunset (returning
home only).
trigger:
- platform: state
entity_id: switch.sw_garage_vehicledoorcontact
to: 'on'
condition:
- condition: and
conditions:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: state
entity_id: binary_sensor.snr_garage_housedoorcontact_contact
state: 'off'
for:
hours: 0
minutes: 10
seconds: 0
- condition: state
entity_id: switch.sw_garage_ceilingmainlights
state: 'off'
action:
- action: switch.turn_on
data: {}
target:
entity_id: switch.sw_garage_ceilingmainlights
mode: single
- id: '1642795421437'
alias: 'House: Nofity if any always on plug turned Off'
description: send notification to everyone, including the TV, if an always on plug
has been off for 1 minute
trigger:
- platform: state
entity_id: switch.group_always_on_plugs
to: 'off'
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- action: notify.mobile_app_turraphone
data:
title: "❗\U0001F50C Plug Power OFF"
message: Power OFF detected at {{ triggered_plug }}.
data:
push:
sound:
name: default
critical: 1
volume: 1
- action: notify.grp_all_tvs
data:
message: ALERT! Power OFF at {{ triggered_plug }}.
mode: single
variables:
triggered_plug: "{% for entity in trigger.to_state.attributes.entity_id %}\n {#
state could be: off, unavailable and none #}\n {% if not is_state(entity, 'on')
%}\n {{ state_attr(entity, 'friendly_name') }}\n {% endif %}\n{% endfor
%}\n"
- id: '1642826717353'
alias: 'Laundry: Washing Machine Off if water leak detected'
description: turn off power to washing machine if water leak sensor is triggered
in laundry room
trigger:
- platform: state
entity_id: binary_sensor.snr_laundry_washingmachineleak_water_leak
to: 'on'
condition:
action:
- action: switch.turn_off
target:
entity_id: switch.plg_laundry_washingmachine
mode: single
- id: '1643213265225'
alias: 'Crawlspace: Lab light toggle when Button is pressed'
description: ''
triggers:
- trigger: device
domain: mqtt
device_id: 99cf4a4d4355f3dd5b3ad658939ae608
type: action
subtype: single
id: single
conditions: []
actions:
- action: light.toggle
target:
entity_id: light.blb_crawlspace_lab
data:
kelvin: 4500
brightness: 255
mode: single
- id: '1645572649812'