-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
2768 lines (2762 loc) · 71 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: fa3d6ded-04a9-4001-b826-693865fdb99e
alias: Waste Collection Reminder
description: Waste collection reminder
trigger:
- platform: calendar
event: start
offset: '-6:0:0'
entity_id: calendar.waste_collection
condition: []
action:
- variables:
to_notify: "{% if trigger.calendar_event.summary in [\"Garbage\", \"Garbage
& Glass\"] %} \njena_phone\n{% else %}\nmike_phone\n{% endif %}\n"
- service: notify.{{ to_notify }}
data:
title: '{{ trigger.calendar_event.summary }} Collection Reminder'
message: Reminder that {{ trigger.calendar_event.summary }} pickup is tomorrow!
mode: single
- id: 4085e051-34e7-4fe8-865b-876231d8360c
alias: HACS Update Notification
description: Check for HACS updates at noon and send notification
mode: single
trigger:
- platform: time
at: '12:00:00'
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.hacs
state: '0'
action:
- service: notify.mike_phone
data:
title: HACS Updates Available!
message: '{{ states(''sensor.hacs'') }} HACS plugin update(s) available!
'
data:
url: /hacs/entry
clickAction: /hacs/entry
- id: 27cd055a-4985-4718-bcfd-1e2c9e969e3b
alias: Set Lovelace Minimalist Theme
description: Set theme on start
mode: single
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: frontend.set_theme
data:
name: minimalist-ios-tapbar
mode: dark
- id: 13acacc8-ccc4-438d-8e99-3b8d35f76511
alias: Tesla Location
description: ''
trigger:
- platform: mqtt
topic: teslamate/cars/1/latitude
- platform: mqtt
topic: teslamate/cars/1/longitude
action:
- service: device_tracker.see
data_template:
dev_id: tesla_location
gps:
- '{{ states.sensor.tesla_latitude.state }}'
- '{{ states.sensor.tesla_longitude.state }}'
initial_state: true
- id: 703d666a-bae6-445c-8c39-d6c62eefeb49
alias: Garage Door Actions
description: ''
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: GARAGE_DOOR_CLOSE
id: CLOSE
- platform: event
event_type: mobile_app_notification_action
event_data:
action: GARAGE_DOOR_OPEN
id: OPEN
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: OPEN
- condition: state
entity_id: cover.gdo_door
state: closed
sequence:
- service: cover.open_cover
target:
entity_id: cover.gdo_door
data: {}
- conditions:
- condition: trigger
id: CLOSE
- condition: state
entity_id: cover.gdo_door
state: open
sequence:
- service: cover.close_cover
target:
entity_id: cover.gdo_door
data: {}
default: []
mode: single
- id: 90bd2488-3a65-4697-9069-c3b2a316e527
alias: Front Door Actions
description: ''
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: FRONT_DOOR_LOCK
id: LOCK
- platform: event
event_type: mobile_app_notification_action
event_data:
action: FRONT_DOOR_UNLOCK
id: UNLOCK
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: UNLOCK
- condition: state
entity_id: lock.front_door_lock
state: locked
sequence:
- service: lock.unlock
target:
entity_id: lock.front_door_lock
data: {}
- conditions:
- condition: trigger
id: LOCK
- condition: state
entity_id: lock.front_door_lock
state: unlocked
sequence:
- service: lock.lock
target:
entity_id: lock.front_door_lock
data: {}
default: []
mode: single
- id: 369b6770-b1fe-4f14-a273-cb95db0f56bb
alias: Hue Go Scene Selector
description: scene triggers for hue go
trigger:
- platform: state
entity_id: light.hue_go
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.state == "On" }}'
sequence:
- service: light.turn_on
target:
entity_id: light.hue_go
data: {}
- conditions:
- condition: template
value_template: '{{ trigger.to_state.state == "Off" }}'
sequence:
- service: light.turn_off
target:
entity_id: light.hue_go
data: {}
- conditions:
- condition: template
value_template: '{{ trigger.to_state.state == "Dimmed" }}'
sequence:
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id: light.hue_go
- conditions:
- condition: template
value_template: '{{ trigger.to_state.state == "Night Light" }}'
sequence:
- service: light.turn_on
data:
brightness_pct: 10
target:
entity_id: light.hue_go
default: []
mode: single
- id: 4a87ceb8-e84c-4076-952a-c8abaeb7b9c7
alias: Home Alarm Actions
description: Confirm action, then cancel print
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: ALARM_DISARM
id: disarm
- platform: event
event_type: mobile_app_notification_action
event_data:
action: ALARM_ARM
id: arm
condition: []
action:
- alias: Perform the action
choose:
- conditions:
- condition: template
value_template: '{{ trigger.id == ''disarm'' }}'
sequence:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
data: {}
- conditions:
- condition: template
value_template: '{{ trigger.id == ''arm'' }}'
sequence:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.home_alarm
data: {}
mode: parallel
- id: 5e123bef-5249-4946-b4d9-c4a8b1040391
alias: 'Coming Home: Entry Lights On'
description: Coming home automation
trigger:
- platform: zone
entity_id: person.jena
zone: zone.home
event: enter
- platform: zone
entity_id: person.mike
zone: zone.home
event: enter
condition:
- condition: or
conditions:
- condition: sun
after: sunset
after_offset: -02:00:00
- condition: sun
before: sunrise
before_offset: 02:00:00
action:
- wait_for_trigger:
- platform: state
entity_id:
- lock.front_door_lock
to: unlocked
- service: light.turn_on
target:
entity_id:
- light.entry_stairs_light
- light.sonoff31_1
- light.kitchen_light
data: {}
mode: single
- id: a2d52348-e8e6-4129-a683-5b82a55d80b1
alias: Contact Lens Reminder
description: Contact Lens Notification Reminder
trigger:
- platform: time
at: 07:30:00
condition:
- condition: template
value_template: '{{ now().day == 20 }}'
action:
- service: notify.mike_phone
data:
message: Contact change reminder
title: Time to change Contacts!
mode: single
- id: a7fddf7d-e97c-45e0-a6e7-0eae5004ccbc
alias: Lights On Routine
description: ''
trigger:
- platform: template
value_template: '{{now().strftime(''%a %h %d %H:%M %Z %Y'') == (((state_attr(''sensor.mike_phone_next_alarm'',
''Time in Milliseconds'') | int / 1000) - 1*60 ) | timestamp_custom(''%a %h
%d %H:%M %Z %Y''))}}'
condition:
- condition: state
entity_id: person.mike
state: home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.master_bathroom_motion_detector_occupancy
to: 'on'
timeout: 3600
continue_on_timeout: false
- choose:
- conditions:
- condition: state
entity_id: person.jena
state: home
sequence:
- delay:
seconds: 5
- service: homeassistant.turn_on
target:
area_id: master_bathroom
data: {}
- delay:
minutes: 20
- choose:
- conditions:
- condition: state
entity_id: person.jena
state: away
sequence:
- service: light.turn_on
target:
entity_id: light.master_bedroom_light
data: {}
- service: light.turn_on
target:
area_id: hallway
data: {}
- wait_for_trigger:
- platform: state
entity_id: light.master_bedroom_light
to: 'off'
- platform: state
entity_id: light.master_bathroom_lights
to: 'off'
timeout: 1800
continue_on_timeout: false
- delay:
seconds: 10
- service: light.turn_on
data:
brightness_pct: 100
target:
area_id:
- living_room
- kitchen
mode: single
- id: 9a67d806-4cf0-44cb-93ea-f32d08d1ba62
alias: Wireless Charging Night Routine
description: Evening Routine, wireless charging trigger
trigger:
- platform: state
entity_id: sensor.mike_phone_charger_type
to: wireless
condition:
- condition: time
before: 04:00:00
after: '21:00:00'
- condition: zone
entity_id: person.mike
zone: zone.home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: alarm_control_panel.alarm_arm_night
target:
entity_id: alarm_control_panel.home_alarm
data: {}
- alias: Turn all lights off, check if Jena is awake to cancel
if:
- condition: zone
entity_id: person.jena
zone: zone.home
- condition: time
weekday:
- fri
- sat
then:
- alias: Set up variables for the actions
variables:
action_yes: '{{ ''YES_'' ~ context.id }}'
action_no: '{{ ''NO_'' ~ context.id }}'
- alias: Ask to cancel lights off
service: notify.jena_phone
data:
title: It is bedtime!
message: would you like to turn the lights off?
data:
actions:
- action: '{{ action_yes }}'
title: Yes, lights off
- action: '{{ action_no }}'
title: No, keep them on
- alias: Wait for a response
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_yes }}'
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_no }}'
timeout:
minutes: 1
continue_on_timeout: true
- choose:
- conditions:
- condition: template
value_template: '{{ wait.trigger and wait.trigger.event.data.action == action_no
}}'
sequence:
- stop: Jena said so
- service: light.turn_off
data: {}
target:
floor_id:
- first_floor
- main_floor
- second_floor
mode: single
- id: e9e7e1f6-2b0f-408d-88e5-8a262cad80b7
alias: Hue Go Routine
description: Turn Hue Go on in the morning
trigger:
- platform: time
at: 06:05:00
id: First
- platform: time
at: 06:05:00
id: Second
condition:
- condition: state
entity_id: input_boolean.jena_alarm_enabled
state: 'on'
- condition: state
entity_id: person.jena
state: home
- condition: state
entity_id: binary_sensor.workday
state: 'on'
- condition: template
value_template: '{{ now().month >= 8 or now().month <= 4 }}'
- condition: or
conditions:
- condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- condition: trigger
id:
- First
- condition: and
conditions:
- condition: time
weekday:
- thu
- fri
- condition: trigger
id:
- Second
action:
- data:
transition: 300
brightness_step: 200
color_temp: 355
target:
entity_id: light.hue_go
action: light.turn_on
- wait_for_trigger:
- platform: state
entity_id:
- light.guest_bedroom_light
to: 'on'
timeout:
minutes: 25
- target:
entity_id: light.hue_go
data: {}
action: light.turn_off
mode: single
- id: 6c11052a-1ed4-49f3-ab12-0293fd86c749
alias: Lights Off Away
description: ''
trigger:
- platform: template
value_template: '{{ now().timestamp() | timestamp_custom(''%H:%M'') == (state_attr(''input_datetime.jena_alarm'',
''timestamp'') - 1*60) | timestamp_custom(''%H:%M'', false) }}'
condition:
- condition: state
entity_id: input_boolean.jena_alarm_enabled
state: 'on'
- condition: state
entity_id: person.jena
state: home
- condition: state
entity_id: binary_sensor.workday
state: 'on'
action:
- wait_for_trigger:
- platform: zone
entity_id: person.jena
zone: zone.home
event: leave
- platform: state
entity_id:
- lock.front_door_lock
to: unlocked
timeout:
hours: 2
- service: light.turn_off
target:
area_id:
- kitchen
- living_room
data: {}
mode: single
- id: e2c52eaa-0d5c-42bd-8b1a-6bc650b8825a
alias: Main Floor Lights On
description: Turn on living room lights in the morning
trigger:
- platform: template
value_template: '{{ now().timestamp() | timestamp_custom(''%H:%M'') == (state_attr(''input_datetime.jena_alarm'',
''timestamp'') - 1*60) | timestamp_custom(''%H:%M'', false) }}'
condition:
- condition: state
entity_id: input_boolean.jena_alarm_enabled
state: 'on'
- condition: state
entity_id: person.jena
state: home
- condition: state
entity_id: binary_sensor.workday
state: 'on'
action:
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: light.turn_on
target:
entity_id:
- light.christmas_tree
- light.wled_bookshelf
- light.wled_livingroom
area_id:
- kitchen
data: {}
mode: single
- id: 16823993-6422-4ea6-b755-d38f61a6cff1
alias: Christmas Light Timer
description: Christmas lights timer
trigger:
- platform: sun
event: sunset
offset: -01:30:00
id: turn_on
- platform: sun
event: sunset
offset: +07:30:00
id: turn_off
condition:
- condition: state
entity_id: binary_sensor.is_christmas_ish_time
state: 'on'
action:
- service: light.{{ trigger.id }}
target:
entity_id:
- light.christmas_tree
- light.outdoor_christmas_lights
- light.sonoff31_1
- light.wled_bookshelf
- light.wled_livingroom
- if:
- condition: trigger
id: turn_on
then:
- service: select.select_option
data:
option: Christmas
target:
entity_id:
- select.wled_bookshelf_preset
- select.wled_livingroom_preset
mode: single
- id: bf7229ca-f89b-43b1-bc22-7584d4931706
alias: Doorbell Offline
description: Notify if doorbell offline for 10 minutes
trigger:
- platform: state
entity_id:
- camera.front_door_main
to: unavailable
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- service: notify.mike_phone
data:
title: Doorbell Offline!
image: '{{ state_attr(''camera.doorbell'', ''entity_picture'') }}'
message: since {{ as_timestamp(trigger.from_state.last_changed) | timestamp_custom('%y-%m-%d
%H:%M', true) }}
mode: single
- id: a179567f-c15d-47d5-9ffa-3ebf626a5b99
alias: Entry Outside Light Timer
description: Door light timer
trigger:
- platform: sun
event: sunset
offset: +00:20:00
id: turn_on
- platform: sun
event: sunrise
offset: 0
id: turn_off
- platform: state
entity_id:
- light.entry_light
to: 'on'
for:
hours: 6
minutes: 0
seconds: 0
id: turn_off
- platform: time
at: '22:45:00'
id: turn_off
condition:
- condition: state
entity_id: binary_sensor.is_christmas_ish_time
state: 'off'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: light.{{ trigger.id }}
target:
entity_id: light.entry_light
mode: single
- id: 88d5a3db-0080-41d7-92fe-5c32664b9d6e
alias: Doorbell Pressed Recently
description: Doorbell Ring Notification
trigger:
- entity_id: binary_sensor.front_door_button_pressed
platform: state
to: 'on'
id: turn_on
- entity_id: binary_sensor.front_door_button_pressed
platform: state
to: 'on'
id: turn_off
for:
minutes: 5
- platform: time_pattern
minutes: /10
id: turn_off
action:
- if:
- condition: trigger
id: turn_off
- condition: not
conditions:
- condition: state
entity_id: input_boolean.doorbell_pressed_recently
for:
hours: 0
minutes: 5
seconds: 0
state: 'on'
then:
- stop: was recently pressed
- service: input_boolean.{{ trigger.id }}
target:
entity_id: input_boolean.doorbell_pressed_recently
mode: restart
- id: 5e0b9900-d3f3-435e-9d2d-9788e9f86842
alias: Front Door Auto-Lock Timer
description: Auto lock front door after 5 minutes
trigger:
- platform: state
entity_id: lock.front_door_lock
to: unlocked
for:
hours: 0
minutes: 5
seconds: 0
- platform: zone
entity_id: person.jena
zone: zone.home
event: leave
- platform: zone
entity_id: person.mike
zone: zone.home
event: leave
condition:
- condition: state
entity_id: lock.front_door_lock
state: unlocked
action:
- service: lock.lock
target:
entity_id: lock.front_door_lock
data: {}
mode: single
- id: f0bb9575-0283-494d-b2b8-4082ff8a3f37
alias: Doorbell Pressed Notify
description: Doorbell Ring Notification
trigger:
- entity_id: binary_sensor.front_door_button_pressed
platform: state
to: 'on'
condition: []
action:
- alias: Set up variables for the actions
variables:
action_1: FRONT_DOOR_UNLOCK
- data_template:
entity_id: camera.doorbell
filename: /config/www/doorbell/{{ expand(button)[0].last_changed | as_timestamp |
timestamp_custom("%Y-%m-%d_%H-%M-%S") }}.jpg
service: camera.snapshot
- service: notify.all_devices
data:
title: Someone's at the front door!
message: '{{ as_timestamp(now()) | timestamp_custom(''%d:%m %H:%M'', true) }}'
data:
ttl: 0
priority: high
channel: alarm_stream
push:
sound:
name: US-EN-Morgan-Freeman-Someone-Is-Arriving.wav
critical: 1
volume: 1
image: '{{ image_file }}'
actions:
- action: URI
title: View
uri: '{{ view_uri }}'
- action: URI
title: Answer
uri: '{{ answer_uri }}'
- action: '{{ action_1 }}'
title: Unlock
mode: parallel
variables:
button: binary_sensor.front_door_button_pressed
dashboard_uri: /lovelace/default_view
view_uri: /lovelace/doorbell
answer_uri: /lovelace/doorbell-answer
image_file: /local/doorbell/{{ expand(button)[0].last_changed | as_timestamp |
timestamp_custom("%Y-%m-%d_%H-%M-%S") }}.jpg
- id: aad80618-b3b1-43cc-925e-17628095ba40
alias: Doorbell Pressed, Night, Light On
description: Turn on entry light if doorbell pressed at night
trigger:
- platform: state
entity_id: binary_sensor.front_door_button_pressed
to: 'on'
condition:
- condition: sun
after: sunset
before: sunrise
before_offset: -01:00:00
- condition: state
entity_id: light.entry_light
state: 'off'
action:
- service: light.turn_on
target:
entity_id: light.entry_light
data: {}
- delay:
minutes: 10
- service: light.turn_off
target:
entity_id: light.entry_light
data: {}
mode: restart
- id: c7cca918-1c0c-4a24-b87b-bf611df6cf4e
alias: Doorbell Notification
description: Doorbell notifications blueprint
use_blueprint:
path: SgtBatten/Stable.yaml
input:
camera: camera.doorbell
base_url: https://home-assistant.chestr.dev
message: '{{ label }} detected - Front Door'
critical: '{{''false'' if now().hour in [8,9,10,11,12,13,14,15,16,17,18] else
''true''}}'
notify_device: 6594c0e1d8d8d8caf5130e60e96b8ec0
ios_live_view: true
labels:
- person
- package
disable_times:
- '10'
- '11'
- '12'
- '13'
- '14'
- '15'
- '16'
- '17'
- '18'
- '19'
- '20'
- '21'
- '22'
notify_group: all_devices
- id: 9bade4b0-b05a-4e92-a395-cc3f055fb128
alias: Theatre Mode Periodic Reset
description: ''
trigger:
- platform: time
at: 03:00:00
id: turn_on
action:
- service: input_boolean.{{ trigger.id }}
target:
entity_id: input_boolean.theatre_mode
mode: single
- id: 0f398ec0-490a-4c1e-ad26-6567670e64f8
alias: Midnight Lights Off
description: Automation to turn off living room lights at a specified time
trigger:
- platform: time
at: 00:00:00
id: 12am
condition:
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: person.jena
state: home
- condition: state
entity_id: person.mike
state: home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: light.turn_off
target:
area_id: living_room
data: {}
mode: single
- id: dc3d21f7-5302-45ab-b348-1ce964580ea6
alias: FireTV Paused, Lights On
description: FireTV Theatre Mode
trigger:
- platform: state
entity_id:
- media_player.fire_tv
to: playing
for:
seconds: 10
condition:
- condition: sun
after: sunset
after_offset: +03:00:00
- condition: state
entity_id: input_boolean.theatre_mode
state: 'on'
action:
- service: light.turn_off
data:
transition: 5
target:
entity_id:
- light.entry_stairs_light
- light.kitchen_lights
- light.tv_light
- light.couch_light
- light.second_floor_stairs_light
- service: light.turn_on
data:
brightness: 100
transition: 5
target:
entity_id:
- light.wled_livingroom
- service: select.select_option
data:
option: Theatre
target:
entity_id: select.wled_livingroom_preset
- delay:
minutes: 5
mode: single
- id: 915eb363-ed77-414b-8eca-308741e468a0
alias: Vacuum Schedule
description: ''
trigger:
- platform: time
at: '15:00:00'
id: afternoon
condition:
- condition: time
weekday:
- mon
- wed
- fri
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: vacuum.start
metadata: {}
data: {}
target:
entity_id: vacuum.moomba
mode: single
- id: 1a90f945-0125-4f2a-b0d7-c5024d747b26
alias: Lights On Sunset
description: Turn living room lights on at sunset
trigger:
- platform: sun
event: sunset
id: sunset
offset: -00:30:00
condition:
- condition: or
conditions:
- condition: state
entity_id: person.jena
state: home
- condition: state
entity_id: person.mike
state: home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: not
conditions:
- condition: time
after: '18:00:00'
action:
- service: light.turn_on
target:
area_id: living_room
data: {}
mode: single
- id: 4b2201f9-9a6a-46ce-b6d8-2fc50c1db305
alias: Camera Detection Toggle Automation
description: Living Room
trigger:
- platform: state
entity_id:
- alarm_control_panel.home_alarm
to: armed_night
id: turn_on
- platform: state
entity_id:
- alarm_control_panel.home_alarm
to: armed_away
id: turn_on
- platform: state
entity_id:
- alarm_control_panel.home_alarm
to: disarmed
id: turn_off
- platform: state
entity_id:
- alarm_control_panel.home_alarm
to: armed_home
id: turn_off
action:
- service: switch.{{ trigger.id }}
target:
entity_id:
- switch.living_room_detect
- switch.living_room_motion
- switch.living_room_recordings
- switch.living_room_snapshots
- switch.living_room_audio_detection
mode: single
- id: 9a93fee9-693d-4350-a77c-94ea66a4ce98
alias: Fan Aux Button Toggle
description: Fan Aux Automations
trigger:
- platform: state
entity_id: fan.powder_room_fan
attribute: action
to: config_single