-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
978 lines (978 loc) · 26.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
- id: '1661747369154'
alias: HA Start/Stop
description: ''
trigger:
- platform: homeassistant
event: start
id: hastart
- platform: homeassistant
event: shutdown
id: hastop
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: hastart
sequence:
- service: notify.mobile_app_sj
data:
message: Home Assistant Online!
title: Critical Message
- conditions:
- condition: trigger
id: hastop
sequence:
- service: notify.mobile_app_sj
data:
message: Home Assistant Rebooting!
title: Critical Message
default: []
mode: single
- id: '1663217810869'
alias: Doors & Windows Open/Close
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_sensor_contact
- binary_sensor.garage_door_sensor_contact
- binary_sensor.loft_window_sensor_contact
- binary_sensor.walkout_door_sensor_contact
- binary_sensor.basement_door_sensor_contact
- binary_sensor.basement_window_sensor_contact
- binary_sensor.deck_sliding_door_sensor_contact
- binary_sensor.neeva_windows
to: 'on'
id: doorwindowopen
- platform: state
entity_id:
- binary_sensor.front_door_sensor_contact
- binary_sensor.garage_door_sensor_contact
- binary_sensor.loft_window_sensor_contact
- binary_sensor.walkout_door_sensor_contact
- binary_sensor.basement_door_sensor_contact
- binary_sensor.basement_window_sensor_contact
- binary_sensor.deck_sliding_door_sensor_contact
- binary_sensor.neeva_windows
to: 'off'
id: doorwindowclose
condition: []
action:
- service: script.door_alert
data: {}
- choose:
- conditions:
- condition: trigger
id: doorwindowopen
sequence:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Open'
- conditions:
- condition: trigger
id: doorwindowclose
sequence:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Closed'
title: Security Message
mode: single
- id: '1663995445012'
alias: Alarmo
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.home
to: armed_home
id: armed_home
- platform: state
entity_id:
- alarm_control_panel.home
to: armed_night
id: armed_night
- platform: state
entity_id:
- alarm_control_panel.home
to: armed_away
id: armed_away
- platform: state
entity_id:
- alarm_control_panel.home
to: disarmed
id: disarmed
- platform: state
entity_id:
- alarm_control_panel.home
to: arming
id: arming
- platform: state
entity_id:
- alarm_control_panel.home
to: pending
id: pending
- platform: state
entity_id:
- alarm_control_panel.home
to: triggered
id: triggered
- platform: event
event_type: alarmo_failed_to_arm
id: failed
- platform: event
event_type: alarmo_command_success
id: success
- platform: mqtt
topic: zigbee2mqtt/keypad
id: keypad
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: armed_home
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "arm_day_zones" } }'
- conditions:
- condition: trigger
id: armed_night
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "arm_night_zones" } }'
- conditions:
- condition: trigger
id: armed_away
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "arm_all_zones" } }'
- conditions:
- condition: trigger
id: disarmed
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "disarm" } }'
- conditions:
- condition: trigger
id: arming
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "exit_delay" } }'
- conditions:
- condition: trigger
id: pending
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "entry_delay" } }'
- conditions:
- condition: trigger
id: triggered
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "mode": "in_alarm" } }'
- conditions:
- condition: trigger
id: failed
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.reason == ''invalid_code'' }}'
sequence:
- service: mqtt.publish
data:
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id }}, "mode":
"invalid_code" } }'
topic: zigbee2mqtt/keypad/set
- conditions:
- condition: template
value_template: '{{ trigger.event.data.reason == ''open_sensors'' }}'
sequence:
- service: mqtt.publish
data:
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id }}, "mode":
"not_ready" } }'
topic: zigbee2mqtt/keypad/set
- conditions:
- condition: template
value_template: '{{ trigger.event.data.reason == ''not_allowed'' }}'
- condition: template
value_template: '{{ trigger.event.data.reason == ''disarm'' }}'
sequence:
- service: mqtt.publish
data:
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id }}, "mode":
"already_disarmed" } }'
topic: zigbee2mqtt/keypad/set
- conditions:
- condition: trigger
id: success
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.action == ''arm'' }}'
- condition: template
value_template: '{{ trigger.event.data.context_id != null }}'
- condition: template
value_template: '{{ trigger.event.data.mode == ''away'' }}'
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id
}}, "mode": "arm_all_zones" } }'
- conditions:
- condition: template
value_template: '{{ trigger.event.data.action == ''arm'' }}'
- condition: template
value_template: '{{ trigger.event.data.context_id != null }}'
- condition: template
value_template: '{{ trigger.event.data.mode == ''home'' }}'
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id
}}, "mode": "arm_day_zones" } }'
- conditions:
- condition: template
value_template: '{{ trigger.event.data.action == ''arm'' }}'
- condition: template
value_template: '{{ trigger.event.data.context_id != null }}'
- condition: template
value_template: '{{ trigger.event.data.mode == ''night'' }}'
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id
}}, "mode": "arm_night_zones" } }'
- conditions:
- condition: template
value_template: '{{ trigger.event.data.action == ''disarm'' }}'
- condition: template
value_template: '{{ trigger.event.data.context_id != null }}'
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/keypad/set
payload: '{ "arm_mode": { "transaction": {{ trigger.event.data.context_id
}}, "mode": "disarm" } }'
- conditions:
- condition: trigger
id: keypad
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.action == "disarm" }}'
sequence:
- service: alarmo.disarm
data:
entity_id: alarm_control_panel.home
code: '{{ trigger.payload_json.action_code }}'
context_id: '{{ trigger.payload_json.action_transaction }}'
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.action == "arm_all_zones" }}'
sequence:
- service: alarmo.arm
data:
entity_id: alarm_control_panel.home
mode: away
code: '{{ trigger.payload_json.action_code }}'
context_id: '{{ trigger.payload_json.action_transaction }}'
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.action == "arm_day_zones" }}'
sequence:
- service: alarmo.arm
data:
entity_id: alarm_control_panel.home
mode: home
code: '{{ trigger.payload_json.action_code }}'
context_id: '{{ trigger.payload_json.action_transaction }}'
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.action == "arm_night_zones" }}'
sequence:
- service: alarmo.arm
data:
entity_id: alarm_control_panel.home
mode: night
code: '{{ trigger.payload_json.action_code }}'
context_id: '{{ trigger.payload_json.action_transaction }}'
mode: parallel
max: 10
- id: '1664594503267'
alias: Auto Arm Security
description: ''
trigger:
- platform: state
entity_id:
- person.arleepta
- person.sooraj_chettada
to: not_home
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: and
conditions:
- condition: state
entity_id: alarm_control_panel.home
state: disarmed
- condition: state
entity_id: person.arleepta
state: not_home
- condition: state
entity_id: person.sooraj_chettada
state: not_home
action:
- service: alarmo.arm
data:
code: '1985'
mode: away
force: true
skip_delay: true
entity_id: alarm_control_panel.home
- device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: lock
mode: single
- id: '1677274589664'
alias: Rack Light On/Off
description: ''
trigger:
- platform: state
entity_id:
- sensor.rack_light_switch_action
to: single
condition: []
action:
- service: light.toggle
data: {}
target:
device_id: abb44e139e83eb2414e59654c64ee273
mode: single
- id: '1681345612250'
alias: Front Door Bell
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_visitor
to: 'on'
from: 'off'
condition: []
action:
- data:
message: Someone is at front door
action: script.alexa_announcement
enabled: false
- data:
message: Someone is at front door
action: script.notify_phones
- data: {}
action: script.door_bell
mode: single
- id: '1684639035497'
alias: Lights On
description: ''
trigger:
- platform: sun
event: sunset
offset: -00:10:00
condition: []
action:
- service: light.turn_on
data: {}
target:
entity_id:
- light.stair_light
- light.kitchen_light
- light.driveway_light
- light.porch_light
mode: single
- id: '1684639231696'
alias: Lights Off
description: ''
trigger:
- platform: time
at: '22:00:00'
id: night
- platform: time
at: '23:30:00'
id: latenight
- platform: sun
event: sunrise
offset: 0
id: sunrise
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: sunrise
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.driveway_light
- conditions:
- condition: trigger
id: night
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.kitchen_light
- light.stair_light
- conditions:
- condition: trigger
id:
- latenight
sequence:
- service: light.turn_off
target:
entity_id: light.porch_light
data: {}
mode: single
- id: '1686972244347'
alias: Basement Stair Light
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.basement_door_sensor_contact
from: 'off'
to: 'on'
id: open
- platform: state
entity_id:
- binary_sensor.basement_door_sensor_contact
from: 'on'
to: 'off'
id: close
- platform: state
entity_id:
- binary_sensor.basement_door_sensor_contact
from: 'off'
to: 'on'
for:
hours: 0
minutes: 15
seconds: 0
id: openlong
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: open
- condition: state
entity_id: light.basement_stair_light
state: 'off'
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.basement_stair_light
- conditions:
- condition: trigger
id: close
- condition: state
entity_id: light.basement_stair_light
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.basement_stair_light
- conditions:
- condition: trigger
id: openlong
- condition: state
entity_id: light.basement_light
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.basement_stair_light
mode: single
- id: '1690577897483'
alias: Leak Sensor Notification
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.kitchen_sink_leak_sensor_water_leak
- binary_sensor.basement_drain_leak_sensor_water_leak
- binary_sensor.recirculation_pump_leak_sensor_water_leak
to: 'on'
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} detected'
title: Critical Message
mode: single
- id: '1702406910255'
alias: Garage Status
description: ''
trigger:
- platform: state
entity_id:
- cover.ratgdov25i_18fe0b_door
- cover.ratgdov25i_18fe0a_door
from: closed
to: opening
id: open
enabled: true
- platform: state
entity_id:
- cover.ratgdov25i_18fe0b_door
- cover.ratgdov25i_18fe0a_door
from: open
to: closing
id: close
enabled: true
- platform: state
entity_id:
- cover.ratgdov25i_18fe0b_door
- cover.ratgdov25i_18fe0a_door
id: longopen
enabled: true
to: open
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- open
sequence:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} is {{ trigger.to_state.state
}}'
- conditions:
- condition: trigger
id:
- close
sequence:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} is {{ trigger.to_state.state
}}'
- conditions:
- condition: trigger
id:
- longopen
sequence:
- service: script.notify_all
data:
message: '{{ trigger.to_state.attributes.friendly_name }} is {{ trigger.to_state.state
}} for 5 mins.'
enabled: true
mode: single
- id: '1704390098395'
alias: Check All Door Status
description: ''
trigger:
- platform: time_pattern
minutes: /15
condition: []
action:
- sequence:
- if:
- condition: state
entity_id: binary_sensor.front_door_sensor_contact
state: 'on'
for:
hours: 0
minutes: 15
seconds: 0
then:
- service: script.notify_all
data:
message: Front Door is Open for {{ relative_time(states.binary_sensor.front_door_sensor_contact.last_changed)
}}
title: Security Message
- if:
- condition: state
entity_id: binary_sensor.garage_door_sensor_contact
state: 'on'
for:
hours: 0
minutes: 15
seconds: 0
then:
- service: script.notify_all
data:
message: Garage Door is Open for {{ relative_time(states.binary_sensor.garage_door_sensor_contact.last_changed)
}}
title: Security Message
mode: single
- id: '1704928174660'
alias: Study Lights On/Off
description: ''
trigger:
- type: motion
platform: device
device_id: 8eb24ac06958179d41b9e54f44553268
entity_id: f3b2a5ea13aad341b431767c21bad3ce
domain: binary_sensor
id: 'on'
- type: no_motion
platform: device
device_id: 8eb24ac06958179d41b9e54f44553268
entity_id: f3b2a5ea13aad341b431767c21bad3ce
domain: binary_sensor
for:
hours: 0
minutes: 5
seconds: 0
id: 'off'
condition:
- condition: sun
after: sunset
before: sunrise
action:
- choose:
- conditions:
- condition: trigger
id:
- 'on'
sequence:
- service: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.study_light
- conditions:
- condition: trigger
id:
- 'off'
sequence:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.study_light
mode: single
- id: '1711769380993'
alias: Night Check
description: ''
triggers:
- at: '22:30:00'
trigger: time
conditions: []
actions:
- data:
message: There are {{expand(state_attr('light.all_lights', 'entity_id'))| selectattr('state','eq','on')|map(attribute='entity_id')|list|count}}
light(s) On! - {{expand(state_attr('light.all_lights', 'entity_id'))| selectattr('state','eq','on')|map(attribute='name')|list}}
action: script.notify_phones
- data:
message: There are {{expand(state_attr('binary_sensor.doors_windows', 'entity_id'))|
selectattr('state','eq','on')|map(attribute='entity_id')|list|count}} door(s)/Window(s)
Open! - {{expand(state_attr('binary_sensor.doors_windows', 'entity_id'))|
selectattr('state','eq','on')|map(attribute='name')|list}}
action: script.notify_phones
- data:
message: There are {{expand(state_attr('lock.all_doors', 'entity_id'))| selectattr('state','eq','unlocked')|map(attribute='entity_id')|list|count}}
door(s) Unlocked! - {{expand(state_attr('lock.all_doors', 'entity_id'))| selectattr('state','eq','unlocked')|map(attribute='name')|list}}
action: script.notify_phones
- data:
message: There are {{expand(state_attr('switch.all_switches', 'entity_id'))|
selectattr('state','eq','on')|map(attribute='entity_id')|list|count}} switch(s)
On! - {{expand(state_attr('switch.all_switches', 'entity_id'))| selectattr('state','eq','on')|map(attribute='name')|list}}
action: script.notify_phones
mode: single
- id: '1714447816906'
alias: Door Lock/Unlock Status
description: ''
triggers:
- device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: unlocked
id: gd_unlock
trigger: device
- device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: locked
id: gd_locked
trigger: device
- device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: jammed
id: gd_jammed
trigger: device
- device_id: ffdf93c07bcdcb929e54e064d383b470
domain: lock
entity_id: b438392b34f145fed27c1ed5aaf709c7
type: unlocked
trigger: device
id: fd_unlock
- device_id: ffdf93c07bcdcb929e54e064d383b470
domain: lock
entity_id: b438392b34f145fed27c1ed5aaf709c7
type: locked
trigger: device
id: fd_locked
- device_id: ffdf93c07bcdcb929e54e064d383b470
domain: lock
entity_id: b438392b34f145fed27c1ed5aaf709c7
type: jammed
trigger: device
id: fd_jammed
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- gd_unlock
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Unlocked'
title: Security Message
action: script.notify_all
- conditions:
- condition: trigger
id:
- gd_locked
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Locked'
title: Security Message
action: script.notify_all
- conditions:
- condition: trigger
id:
- gd_jammed
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Jammed'
title: Security Message
action: script.notify_all
- conditions:
- condition: trigger
id:
- fd_unlock
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Unlocked'
title: Security Message
action: script.notify_all
- conditions:
- condition: trigger
id:
- fd_locked
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Locked'
title: Security Message
action: script.notify_all
- conditions:
- condition: trigger
id:
- fd_jammed
sequence:
- data:
message: '{{ trigger.to_state.attributes.friendly_name }} is Jammed'
title: Security Message
action: script.notify_all
mode: single
- id: '1718425424769'
alias: Auto Disarm Security
description: ''
trigger:
- platform: zone
entity_id: person.arleepta
zone: zone.home
event: enter
- platform: zone
entity_id: person.sooraj_chettada
zone: zone.home
event: enter
condition: []
action:
- sequence:
- if:
- condition: device
device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: is_locked
then:
- device_id: f6fb94ee1b2f598b481ded658a4af30b
domain: lock
entity_id: 191d58b23eef085ccf6f38511077e5cd
type: unlock
- if:
- condition: state
entity_id: alarm_control_panel.home
state: armed_away
then:
- service: alarm_control_panel.alarm_disarm
metadata: {}
data:
code: '1985'
target:
entity_id: alarm_control_panel.home
mode: single
- id: '1721442422593'
alias: Turn Off Automations
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.turn_off_automations
from: 'off'
to: 'on'
id: turnoff
- platform: state
entity_id:
- input_boolean.turn_off_automations
from: 'on'
to: 'off'
id: turnon
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- turnoff
sequence:
- service: automation.turn_off
target:
entity_id:
- automation.door_lock_unlock_status
- automation.doors_windows_open_close
data:
stop_actions: true
- conditions:
- condition: trigger
id:
- turnon
sequence:
- service: automation.turn_on
target:
entity_id:
- automation.door_lock_unlock_status
- automation.doors_windows_open_close
data: {}
mode: single
- id: '1727806768707'
alias: Power Status
description: ''
trigger:
- platform: state
entity_id:
- sensor.ups_status
from: Online
id: poweroff
- platform: state
entity_id:
- sensor.ups_status
to: Online
id: poweron
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- poweroff
sequence:
- data:
message: Power Is Off
action: script.notify_phones
- conditions:
- condition: trigger
id:
- poweron
sequence:
- data:
message: Power Is On
action: script.notify_phones
mode: single
- id: '1730651438663'
alias: Outdoor Lights
description: ''
triggers:
- trigger: time
at: 00:30:00
id: night
- trigger: sun
event: sunset
offset: 0
id: eve
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- eve
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id:
- switch.tp_link_smart_plug_048d_od1
- switch.tp_link_smart_plug_048d_od2
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id:
- switch.porch_light
- switch.driveway_light
- conditions:
- condition: trigger
id:
- night
sequence:
- action: switch.turn_off
target:
entity_id:
- switch.tp_link_smart_plug_048d_od1
- switch.tp_link_smart_plug_048d_od2
data: {}
mode: single