-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
automations.yaml
3542 lines (3538 loc) · 98.6 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
---
## Automations
- id: "1701111117565"
alias: Report state on start-up
trigger:
- platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
topic: cmnd/sonoffs/backlog
payload: power1 ; power2; power3; power4; power5; power6; dimmer; state
- delay: 10
- service: mqtt.publish
data:
topic: cmnd/tasmotas/backlog
payload: power1 ; power2; power3; power4; power5; power6; dimmer; state
- delay: 10
- service: mqtt.publish
data:
topic: shellies/command
payload: announce
- delay: 10
- service: button.press
continue_on_error: true
target:
entity_id: button.main_kiosk_load_start_url
- service: button.press
continue_on_error: true
target:
entity_id: button.ensuite_kiosk_load_start_url
- delay:
seconds: 10
- service: script.browser_window_reload
- delay:
seconds: 10
- service: frontend.set_theme
data:
name: Blue-Nightz
mode: single
initial_state: true
- id: "1735793299155456532216"
alias: Integration Watchdog ## code framework thanks to @dsellers1
description: >
This automation watches entities to ensure the integration is functioning; if
not, it will restart it.
trigger:
- platform: state
entity_id:
- camera.backyard_cam
- camera.den_cam
- camera.driveway_cam
- camera.entry_hall_cam
- camera.garage_cam
- camera.front_door
- camera.front_yard_cam
- camera.kitchen_cam
- camera.kitchen_cam_2
- camera.patio_cam
- camera.poopy_cam
to: unavailable
for:
minutes: 6
action:
- service: homeassistant.reload_config_entry
target:
entity_id: "{{ trigger.entity_id }}"
mode: single
initial_state: true
- id: "17055772299155456532"
mode: single
alias: Start Voice assistant initiated Timer When Duration Set and notify when completed
trigger:
- platform: numeric_state
entity_id:
- input_number.timer_minutes
- input_number.timer_seconds
above: 0
action:
- delay: 1
- service: timer.set_duration
target:
entity_id: timer.voice_timer
data_template:
duration: >-
00:{{ states('input_number.timer_minutes') | int }}:{{ states('input_number.timer_seconds') | int }}
- delay: 1
- service: timer.start
entity_id: timer.voice_timer
- wait_for_trigger:
platform: state
entity_id: timer.voice_timer
from: active
to: idle
- service: notify.mobile_app_pixel_8_pro
data_template:
title: Timer Finished
message: >-
{{ state_attr('timer.voice_timer', 'duration') }} timer has finished
- delay: 1
- service: notify.mobile_app_pixel_8_pro
data:
message: TTS
data:
ttl: 0
priority: high
tts_text: The timer has finished
- service: input_number.set_value
data:
value: 0
target:
entity_id:
- input_number.timer_seconds
- input_number.timer_minutes
- id: "1705577229915545231"
alias: Turn on lights when garage opened after dark
mode: single
trigger:
- platform: state
entity_id:
- cover.garage_door
to: open
condition:
- condition: state
entity_id: binary_sensor.night
state: "on"
action:
- service: light.turn_on
target:
entity_id: light.front_yard_lights
- delay: 600
- service: light.turn_off
target:
entity_id: light.front_yard_lights
- id: "1783625788126933756"
alias: Outside Cam Notifications ON when dark
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.night
to: "on"
for:
minutes: 30
action:
- service: switch.turn_on
target:
entity_id: switch.outside_cam_notifications
- id: "1705577229915545"
alias: Reload kiosk when lovelace is updated ## code framework thanks to @dsellers1
trigger:
- platform: event
event_type: lovelace_updated
condition:
- condition: state
entity_id: input_boolean.kiosk_auto_refresh
state: "on"
action:
- service: lovelace.reload_resources
- delay: 6
- choose:
- conditions:
- condition: state
entity_id: switch.main_kiosk_screen
state: "off"
sequence:
- service: switch.turn_on
entity_id: switch.main_kiosk_screen
- delay: 2
- service: button.press
target:
entity_id: button.main_kiosk_load_start_url
- conditions:
- condition: state
entity_id: switch.main_kiosk_screen
state: "on"
sequence:
- delay: 2
- service: button.press
target:
entity_id: button.main_kiosk_load_start_url
- choose:
- conditions:
- condition: state
entity_id: switch.ensuite_kiosk_screen
state: "off"
sequence:
- service: switch.turn_on
entity_id: switch.ensuite_kiosk_screen
- delay: 2
- service: button.press
target:
entity_id: button.ensuite_kiosk_load_start_url
- conditions:
- condition: state
entity_id: switch.ensuite_kiosk_screen
state: "on"
sequence:
- delay: 2
- service: button.press
target:
entity_id: button.ensuite_kiosk_load_start_url
mode: single
- id: "17016739887151444"
alias: Reboot Kiosk
trigger:
- platform: device
type: turned_off
device_id: 17f117e87ed2ea44630be8afa72f7334
entity_id: switch.main_kiosk_screen
domain: switch
- platform: state
entity_id:
- light.ac9b7f58_cfbfe785_screen
to: "off"
condition:
- condition: time
after: 05:00:00
before: "23:59:01"
action:
- delay:
minutes: 1
- service: switch.turn_on
target:
entity_id: switch.main_kiosk_screen
- delay: 3
- service: light.turn_on
target:
entity_id: light.ac9b7f58_cfbfe785_screen
- delay: 3
- service: button.press
target:
entity_id: button.main_kiosk_load_start_url
mode: single
- id: "17055555555545"
alias: Create a notification when something is added to HACS
initial_state: true
trigger:
platform: event
event_type: hacs/repository
event_data:
action: registration
condition:
condition: template
value_template: "{{ trigger.event.data.repository is defined }}"
action:
service: persistent_notification.create
data_template:
title: New repository in HACS
message:
"{% set repo = trigger.event.data.repository %} {% set id = trigger.event.data.repository_id
%} [{{ repo }}](/hacs/repository/{{ id }}) was just added to HACS."
- id: "17066666666675"
alias: Cuckoo Clock
trigger:
- platform: time_pattern
hours: "*"
minutes: "0"
- platform: time_pattern
minutes: "30"
condition:
- condition: state
entity_id: input_boolean.cuckoo_clock
state: "on"
- condition: time
after: 09:29:00
before: "21:30:00"
- condition: template
value_template: |
{% if is_state('media_player.family_tv', 'on') %}
false
{% else %}
true
{% endif %}
action:
- service: media_player.play_media
data_template:
entity_id: media_player.ac9b7f58_cfbfe785
media_content_id: >-
{% if now().strftime("%M")|int == 30 %}
media-source://media_source/local/cuckoo-clock-01.wav {% else %}
media-source://media_source/local/cuckoo-clock-{{now().strftime("%I")}}.wav
{% endif %}
media_content_type: music
initial_state: true
- id: "170666736526675"
alias: Grandfather Clock
trigger:
- platform: time_pattern
hours: "*"
minutes: "0"
- platform: time_pattern
minutes: "30"
condition:
- condition: state
entity_id: input_boolean.grandfather_clock
state: "on"
- condition: time
after: 09:29:00
before: "21:30:00"
- condition: template
value_template: |
{% if is_state('media_player.tv_speakers', 'on') %}
false
{% else %}
true
{% endif %}
action:
- service: media_player.play_media
data_template:
entity_id: media_player.tv_speakers
media_content_id: >-
{% if now().strftime("%M")|int == 15 %}
media-source://media_source/local/gf-hour-15.mp3
{% elif now().strftime("%M")|int == 30 %}
media-source://media_source/local/gf-hour-30.mp3
{% elif now().strftime("%M")|int == 45 %}
media-source://media_source/local/gf-hour-45.mp3 {% else %}
media-source://media_source/local/gf-hour-{{now().strftime("%I")}}.mp3
{% endif %}
media_content_type: music
initial_state: true
- id: "170999999999458"
alias: "[Notify] Smoke Detected"
trigger:
- platform: state
entity_id:
- binary_sensor.nest_protect_hallway_smoke_status
- binary_sensor.nest_protect_kitchen_smoke_status
to: "on"
for:
seconds: 5
action:
- service: noonlight.create_alarm
data:
service: fire
- service: climate.turn_off
target:
entity_id: climate.den
- service: switch.turn_off
entity_id:
- switch.dryer_plug
- service: light.turn_on
target:
entity_id: light.every_light
- service: notify.notify_all
data_template:
message: "{{ trigger.to_state.attributes.friendly_name }} smoke detected 🔥 "
title: Smoke Alarm
data:
channel: alert
group: alert
sticky: true
importance: high
notification_icon: "mdi:smoke-detector-variant-alert"
initial_state: true
- id: "17019999999957"
alias: "[Notify] Water Heater Leak"
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.water_heater
to: "on"
action:
- service: script.water_heater_leak
- id: "170299999999"
alias: "[Notify] Washing Machine Leak"
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.washer_leak
to: "on"
action:
- service: homeassistant.turn_off
entity_id:
- switch.washer_plug
- service: script.washer_leak
- id: "17049999999965"
alias: "[Notify] Garage Fridge OFF"
initial_state: true
trigger:
- platform: state
entity_id: switch.garage_fridge_relay
to: "off"
for:
minutes: 2
action:
- service: notify.mobile_app_pixel_8_pro
data_template:
message: "Garage fridge turned off at '{{ now().strftime('%I:%M %p') }}' "
- delay: 00:15:00
- service: homeassistant.turn_on
entity_id: switch.garage_fridge_relay
- service: notify.mobile_app_pixel_8_pro
data_template:
message: "Garage fridge turned back on at '{{ now().strftime('%I:%M %p') }}' "
- id: "1754999377123967"
alias: "[Notify] Kitchen Fridge OFF"
initial_state: true
trigger:
- platform: state
entity_id: switch.kitchen_fridge
to: "off"
for:
minutes: 2
action:
- service: notify.mobile_app_pixel_8_pro
data_template:
message: "Kitchen fridge turned off at '{{ now().strftime('%I:%M %p') }}' "
- delay: 00:15:00
- service: homeassistant.turn_on
entity_id: switch.kitchen_fridge
- service: notify.mobile_app_pixel_8_pro
data_template:
message: "Kitchen fridge turned back on at '{{ now().strftime('%I:%M %p') }}' "
- id: "17059999999941"
alias: Update Template Sensors
initial_state: true
trigger:
platform: time_pattern
minutes: /59
action:
- service: homeassistant.update_entity
entity_id:
- sensor.tracker_count
- sensor.lights_count
- sensor.binary_sensor_count
- sensor.switch_count
- sensor.automation_count
- sensor.script_count
- sensor.sensor_count
- sensor.alert_count
- sensor.fan_count
- id: "17069999999922"
alias: "[Tablet] background morning"
initial_state: true
trigger:
platform: time
at: 04:30:00
action:
- service: input_select.set_options
entity_id: input_select.wallpaper
data_template:
options:
- christian41.1
- coffee1_11
- coffee1_21
- wallpaper7e
- coffee1_31
- coffee1_41
- coffee1_51
- coffee1_61
- coffee1_71
- service:
script.{{["browser_theme_red", "browser_theme_orange", "browser_theme_yellow",
"browser_theme_geaux", "browser_theme_magenta", "browser_theme_lime", "browser_theme_pink",
"browser_theme_blue", "browser_theme_grey", "browser_theme_green", "browser_theme_purple",
"browser_theme_ocean"] | random }}
- id: "17079999999911"
alias: "[Tablet] background midday"
initial_state: true
trigger:
platform: time
at: "10:00:00"
action:
- service: input_select.set_options
entity_id: input_select.wallpaper
data_template:
options:
- christian1.1
- wallpaper13
- wallpaper7e
- wallpaper66
- christian21
- wallpaper141
- wallpaper33
- christian31
- wallpaper21
- christian41.1
- christian5
- christian61
- christian7.1
- service:
script.{{["browser_theme_red", "browser_theme_orange", "browser_theme_yellow",
"browser_theme_geaux", "browser_theme_magenta", "browser_theme_lime", "browser_theme_pink",
"browser_theme_blue", "browser_theme_grey", "browser_theme_green", "browser_theme_purple",
"browser_theme_ocean"] | random }}
- id: "17089999999955"
alias: "[Tablet] background evening"
initial_state: true
trigger:
platform: time
at: "16:00:00"
action:
- service: input_select.set_options
entity_id: input_select.wallpaper
data_template:
options:
- wallpaper141
- wallpaper1
- wallpaper13
- wallpaper7e
- wallpaper66
- eye11
- christian21
- wallpaper121
- ufo1
- christian5
- welcome4
- christian1.1
- wallpaper5
- service:
'script.{{["browser_theme_red", "browser_theme_orange", "browser_theme_yellow",
"browser_theme_geaux", "browser_theme_magenta", "browser_theme_lime", "browser_theme_pink",
"browser_theme_blue", "browser_theme_grey", "browser_theme_green", "browser_theme_purple",
"browser_theme_ocean"] | random }}'
- id: "17091999999944"
alias: "[Tablet] background night"
initial_state: true
trigger:
platform: time
at: "19:00:00"
action:
- service: input_select.set_options
entity_id: input_select.wallpaper
data_template:
options:
- christian41.1
- wallpaper13
- moonFull
- christian31
- wallpaper7e
- wallpaper141
- moon2Blue
- wallpaper66
- wallpaper1
- christian21
- wallpaper21
- moonLake
- service:
script.{{["browser_theme_red", "browser_theme_orange", "browser_theme_yellow",
"browser_theme_geaux", "browser_theme_magenta", "browser_theme_lime", "browser_theme_pink",
"browser_theme_blue", "browser_theme_grey", "browser_theme_green", "browser_theme_purple",
"browser_theme_ocean"] | random }}
- id: "17092999999977"
alias: "[Tablet] background select"
initial_state: true
trigger:
platform: time_pattern
minutes: /7
action:
- service: input_select.select_next
entity_id: input_select.wallpaper
- service:
'script.{{["browser_theme_red", "browser_theme_orange", "browser_theme_yellow",
"browser_theme_geaux", "browser_theme_magenta", "browser_theme_lime", "browser_theme_pink",
"browser_theme_blue", "browser_theme_grey", "browser_theme_green", "browser_theme_purple",
"browser_theme_ocean"] | random }}'
- id: "17093999999988"
alias: "[Mobile] background select"
initial_state: true
trigger:
platform: time_pattern
minutes: /5
action:
- service: input_select.select_next
entity_id:
- input_select.mobile_wallpaper
- input_select.video_wallpaper
- input_select.rambo_pics
- id: "17094999999944"
alias: "[Tablet] motion_ON"
initial_state: true
trigger:
- platform: state
entity_id:
- light.den_nite_lites
to: "on"
condition:
- condition: time
after: 05:30:00
before: "23:00:00"
action:
- service: switch.turn_on
data:
entity_id: switch.main_kiosk_screen
- service: light.turn_on
data:
entity_id: light.ac9b7f58_cfbfe785_screen
- service: browser_mod.navigate
data:
browser_id:
- ac9b7f58-cfbfe785
path: /lovelace/newtab
- id: "17095999999922"
alias: "[Tablet] motion_OFF_night"
initial_state: true
trigger:
- platform: state
entity_id: light.den_nite_lites
to: "off"
for:
minutes: 15
condition:
- condition: time
after: "22:30:01"
before: 05:30:00
action:
- service: switch.turn_off
data:
entity_id: switch.main_kiosk_screen
- id: "17096999999966"
alias: "[Tablet] motion_OFF_day"
initial_state: true
trigger:
- platform: state
entity_id: light.den_nite_lites
from: "on"
to: "off"
condition:
- condition: time
after: 05:30:01
before: "22:30:00"
action:
- delay: 300
- choose:
- conditions:
- condition: state
entity_id: light.den_nite_lites
state: "off"
sequence:
- service: browser_mod.navigate
data:
browser_id:
- ac9b7f58-cfbfe785
path: /lovelace/random
- conditions:
- condition: state
entity_id: light.den_nite_lites
state: "on"
sequence:
- delay: 300
- service: browser_mod.navigate
data:
browser_id:
- ac9b7f58-cfbfe785
path: /lovelace/random
- delay: 300
- service: browser_mod.navigate
data:
path: /lovelace/screen
browser_id:
- ac9b7f58-cfbfe785
mode: restart
max_exceeded: silent
- id: "17099299999977"
alias: "[Tablet] Toggle tablet icons color"
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.tablet_icons_color
action:
- service: homeassistant.turn_{{- trigger.to_state.state -}}
data:
entity_id: group.tablet_icons
- id: "17099939999933322"
alias: "[Motion] Porch Motion Lights after Dark"
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.front_motion
from: "off"
to: "on"
- platform: device
device_id: 011d22447a45c26939459e4d099889cb
domain: nest
type: camera_person
- platform: device
device_id: 011d22447a45c26939459e4d099889cb
domain: nest
type: camera_motion
condition:
- condition: or
conditions:
- condition: sun
after: sunset
after_offset: 45
- condition: sun
before: sunrise
before_offset: 45
action:
- service: light.turn_on
entity_id:
- light.ha2_porch_light
- light.front_yard_cam_floodlight
- wait_for_trigger:
platform: state
entity_id: binary_sensor.front_motion
from: "on"
to: "off"
- delay: 600
- service: light.turn_off
entity_id:
- light.ha2_porch_light
- light.front_yard_cam_floodlight
mode: restart
max_exceeded: silent
- id: "170999978999162"
alias: "[Presence] Darren Away"
trigger:
- platform: state
entity_id:
- person.darren
to: not_home
for:
minutes: 4
action:
- service: input_boolean.turn_on
entity_id: input_boolean.camera_snapshots
- service: homeassistant.turn_off
continue_on_error: true
entity_id:
- input_boolean.darren_home
- light.office_lights
- switch.ha2_office_monitor
- fan.hallway_fan
- switch.ha2_work_bench
# - switch.keurig_coffee
initial_state: true
mode: single
- id: "170999979999163"
alias: "[Presence] Darren Home"
trigger:
- platform: state
entity_id:
- person.darren
to: home
for:
seconds: 12
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "on"
sequence:
- service: light.turn_on
entity_id: light.outside_lights
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "off"
sequence:
- service: light.turn_on
entity_id: light.entry_hall_lights
- choose:
- conditions:
- condition: state
entity_id: cover.garage_door
state: closed
sequence:
- service: switch.turn_on
entity_id: switch.garage_door
- conditions:
- condition: state
entity_id: cover.garage_door
state: open
sequence:
- service: light.turn_on
entity_id: input_boolean.garage_ceiling_lights
- service: homeassistant.turn_on
continue_on_error: true
entity_id:
- input_boolean.darren_home
- light.office_floor_lights
- wait_for_trigger:
platform: state
entity_id: binary_sensor.office_motion_sensors
from: "off"
to: "on"
- service: homeassistant.turn_on
continue_on_error: true
entity_id:
- fan.hallway_fan
- switch.ha2_office_monitor
- delay: 180
- service: input_boolean.turn_off
entity_id:
- input_boolean.camera_snapshots
initial_state: true
mode: single
- id: "170999979999641209"
alias: "[Presence] Donna Home"
trigger:
- platform: state
entity_id:
- person.donna
to: home
for:
seconds: 12
action:
- service: input_boolean.turn_on
entity_id: input_boolean.donna_home
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "on"
sequence:
- service: light.turn_on
entity_id: light.outside_lights
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "off"
sequence:
- service: light.turn_on
entity_id: light.entry_hall_lights
- choose:
- conditions:
- condition: state
entity_id: cover.garage_door
state: closed
sequence:
- service: switch.turn_on
entity_id: switch.garage_door
- conditions:
- condition: state
entity_id: cover.garage_door
state: open
sequence:
- service: light.turn_on
entity_id: input_boolean.garage_ceiling_lights
initial_state: true
mode: single
- id: "170999989999524"
alias: "[Presence] Donna Away"
trigger:
- platform: state
entity_id:
- person.donna
to: not_home
for:
minutes: 2
action:
- service: input_boolean.turn_off
entity_id: input_boolean.donna_home
- delay: 300
mode: single
initial_state: true
max_exceeded: silent
- id: "17026181774975342345"
alias: "[SWITCH] Outside Lights"
trigger:
- platform: state
entity_id:
- switch.patio_box_fan_switch
condition:
- condition: template
value_template: "{{ trigger.from_state.state != 'unavailable' }}"
action:
- service: homeassistant.turn_{{- trigger.to_state.state -}}
data:
entity_id: light.outside_lights
initial_state: true
- id: "17520931774975342345"
alias: "[SWITCH] Sofa Light"
trigger:
- platform: state
entity_id:
- switch.sofa_lamp
condition:
- condition: template
value_template: "{{ trigger.from_state.state != 'unavailable' }}"
action:
- service: homeassistant.turn_{{- trigger.to_state.state -}}
data:
entity_id: switch.sofa_light_plug_switch
initial_state: true
- id: "170999993999165"
alias: "[Presence] People Away"
trigger:
- platform: state
entity_id: group.person_group
to: not_home
for:
seconds: 180
action:
- service: script.alarm_arm
- service: script.people_away
- service: switch.turn_off
data:
entity_id: switch.main_kiosk_screen
- delay: 300
mode: single
max_exceeded: silent
- id: "170999994999166"
alias: "[Presence] People Home"
trigger:
- platform: state
entity_id: group.person_group
to: home
for:
seconds: 8
action:
- service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.alarmo
data:
code: 3971
- choose:
- conditions:
- condition: state
entity_id: cover.garage_door
state: closed
sequence:
- service: switch.turn_on
entity_id: switch.garage_door
- conditions:
- condition: state
entity_id: cover.garage_door
state: open
sequence:
- service: light.turn_on
entity_id: input_boolean.garage_ceiling_lights
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "on"
sequence:
- service: light.turn_on
entity_id: light.outside_lights
- conditions:
- condition: state
entity_id: binary_sensor.night
state: "off"
sequence:
- service: light.turn_on
entity_id: light.entry_hall_lights
- service: script.people_home
- service: switch.turn_on
continue_on_error: true
data:
entity_id: switch.main_kiosk_screen
- service: light.turn_on
continue_on_error: true
data:
entity_id: light.ac9b7f58_cfbfe785_screen
- service: browser_mod.navigate
continue_on_error: true
data:
browser_id:
- ac9b7f58-cfbfe785
path: /lovelace/newtab
- service: switch.turn_on
continue_on_error: true
data:
entity_id: switch.ensuite_kiosk_screen
- service: light.turn_on
continue_on_error: true
data:
entity_id: light.ensuite_kiosk_screen
- service: browser_mod.navigate
continue_on_error: true
data:
browser_id:
- 1b918469-5d6a2b44
path: /lovelace/ensuite_kiosk
- choose:
- conditions:
- condition: time
after: "22:00:00"
before: "07:00:00"
sequence:
- delay: 360
- service: light.turn_off
entity_id: light.outside_lights
- conditions:
- condition: time
after: "07:00:01"
before: "21:59:59"
sequence:
- delay: 1200
- service: light.turn_off
entity_id: light.outside_lights
mode: single
max_exceeded: silent
- id: "170999995999164"
alias: "[Timer] office fan off"
initial_state: true
trigger:
- platform: state
entity_id: fan.office_fan
to: "on"
action:
# - delay:
# "{{ states('input_number.office_fan_hours') | int }}:{{ states('input_number.office_fan_minutes')
# | int }}:{{ states('input_number.office_fan_seconds') | int }}"
- service: timer.start
data: