-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
11664 lines (11649 loc) · 310 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: '1546210609741'
alias: Morning Automation
trigger:
- platform: template
value_template: '{% set alarm_time = as_timestamp(states(''sensor.anthony_s_echo_show_next_alarm''),
999999999999) %} {% set current_time = as_timestamp(states(''sensor.date_time'').replace('','',
''''), 0) %} {% set pre_time = 12 %} {{ current_time >= alarm_time - pre_time
}}
'
condition:
- condition: state
entity_id: light.fan_lights
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- condition: state
entity_id: input_select.anthony
state: Just Arrived
action:
- service: homeassistant.update_entity
data: {}
target:
entity_id: sensor.anthony_s_echo_show_next_alarm
- delay:
hours: 0
minutes: 0
seconds: 9
milliseconds: 0
- condition: not
conditions:
- condition: state
entity_id: sensor.alarm_display
state: '0'
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id:
- automation.bed_occupancy
- automation.nanoleaf_scene_changer_and_auto_brightness
- service: light.turn_off
data: {}
target:
entity_id: light.bedroom_lights
- continue_on_error: true
parallel:
- if:
- condition: and
conditions:
- condition: state
entity_id: light.wyze_bulb_1
state: unavailable
- condition: state
entity_id: light.wyze_bulb_2
state: unavailable
- condition: state
entity_id: light.wyze_bulb_3
state: unavailable
alias: relay was turned off
then:
- repeat:
sequence:
- service: light.turn_on
data:
brightness_pct: 100
hs_color:
- 30.353
- 33.597
effect: None
target:
entity_id: light.fan_lights
until:
- condition: state
entity_id: light.wyze_bulb_1
state: 'on'
for:
hours: 0
minutes: 0
seconds: 1
- condition: state
entity_id: light.wyze_bulb_2
state: 'on'
for:
hours: 0
minutes: 0
seconds: 1
- condition: state
entity_id: light.wyze_bulb_3
state: 'on'
for:
hours: 0
minutes: 0
seconds: 1
else:
- service: light.turn_on
data:
brightness_pct: 100
hs_color:
- 30.353
- 33.597
effect: None
target:
entity_id: light.fan_lights
- service: light.turn_on
continue_on_error: true
data:
effect: Vibrant Sunrise
brightness_pct: 100
transition: 45
target:
entity_id:
- light.shapes_007f
- light.shapes_ee82
- light.shapes_4948
- service: script.turn_on
data: {}
target:
entity_id: script.play_music
- service: switch.turn_on
data: {}
target:
entity_id: switch.light_switch_relay
- delay:
hours: 0
minutes: 0
seconds: 45
milliseconds: 0
- service: script.turn_on
data: {}
target:
entity_id:
- script.morning
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.bedmotion
- service: automation.turn_on
data: {}
target:
entity_id:
- automation.bed_occupancy
- automation.nanoleaf_scene_changer_and_auto_brightness
- event: event_change_nanoleaf
event_data: {}
- delay:
hours: 0
minutes: 4
seconds: 0
milliseconds: 0
- service: homeassistant.update_entity
data: {}
target:
entity_id: sensor.anthony_s_echo_show_next_alarm
mode: single
- id: '1653601692731'
alias: AC Boost Control
description: ''
triggers:
- entity_id:
- input_boolean.ac_boost
id: buttonpress
to: 'on'
trigger: state
- event_type: timer.finished
event_data:
entity_id: timer.ac
trigger: event
- entity_id:
- input_boolean.ac_boost
- switch.ac
to: 'off'
trigger: state
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- condition: state
entity_id: input_select.anthony
state: Just Arrived
- condition: state
entity_id: person.taylor
state: home
actions:
- if:
- condition: trigger
id: buttonpress
then:
- data:
hvac_mode: cool
target:
entity_id: climate.bedroom_ac
action: climate.set_hvac_mode
- data:
duration: 0:25:00
target:
entity_id: timer.ac
action: timer.start
- if:
- condition: state
entity_id: switch.desktop
state: 'off'
- condition: state
state: 'off'
entity_id: binary_sensor.bedroom_chair
then:
- action: eight_sleep.heat_set
metadata: {}
data:
sleep_stage: current
duration: 1500
target: -100
target:
device_id:
- 1807d01837ccf4f85178b48dd72b10f6
- da76e4d329b4368e1e9c254dadfdf348
- da0aee03d5b8f7fc84c67cedee605139
else:
- if:
- condition: state
entity_id: binary_sensor.shower
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: person.taylor
state: home
- condition: state
entity_id: input_select.anthony
state: Home
- condition: state
entity_id: light.bathroom_lights
state: 'on'
then:
- data: {}
target:
entity_id: timer.ac
action: timer.start
else:
- data: {}
target:
entity_id: input_boolean.ac_boost
action: input_boolean.turn_off
- data: {}
target:
entity_id: timer.ac
action: timer.cancel
- if:
- condition: state
entity_id: person.taylor
state: home
- condition: state
entity_id: binary_sensor.bed_occupancy
state: 'on'
- condition: not
conditions:
- condition: state
entity_id: light.bedroom_lights
state: 'on'
- condition: sun
before: sunrise
after: sunset
then:
- data: {}
target:
entity_id: switch.acfanhigh
action: switch.turn_on
alias: ac fan high if night and taylor home
mode: restart
- id: 43a25b65afed4a4680f5ec81172f11e8
alias: Startup Actions
description: Set Theme, Ensure Location Input Select is Updated
triggers:
- event: start
trigger: homeassistant
actions:
- data:
stop_actions: false
target:
entity_id: automation.ac_controls
action: automation.turn_off
- parallel:
- data:
name: ios-dark-mode-dark-blue
mode: light
action: frontend.set_theme
- if:
- condition: state
entity_id: person.anthony
state: home
then:
- target:
entity_id: input_select.anthony
data:
option: Home
action: input_select.select_option
else:
- condition: template
value_template: '{{ states(''person.anthony'')|lower in [''utd'', ''raytheon'',
''away'', ''not_home''] }}'
- data:
option: Away
target:
entity_id: input_select.anthony
action: input_select.select_option
- if:
- condition: state
entity_id: switch.ac
state: 'on'
- condition: state
entity_id: input_boolean.ac_boost
state: 'on'
then:
- data:
duration: 0
target:
entity_id: timer.ac
action: timer.start
else:
- data: {}
target:
entity_id: input_boolean.ac_boost
action: input_boolean.turn_off
- data: {}
target:
entity_id: timer.ac
action: timer.cancel
- data: {}
target:
entity_id: input_boolean.alexa_notification_sent
action: input_boolean.turn_off
- data: {}
target:
entity_id:
- switch.airport_express
- switch.lumi_lumi_plug_maus01_switch_3
- switch.soundbar_airport
action: switch.turn_on
- if:
- condition: state
entity_id: switch.desktop
state: 'off'
- condition: time
after: 00:00:00
- condition: sun
before: sunrise
then:
- data: {}
target:
entity_id: switch.usb_hub
action: switch.turn_off
- data:
topic: homeassistant/binary_sensor/mailbox/state
payload: empty
action: mqtt.publish
- data: {}
target:
entity_id:
- media_player.owntone_server
- media_player.owntone_output_bathroom
- media_player.owntone_output_anthony_s_desk
- media_player.owntone_output_kitchen_left
- media_player.owntone_output_kitchen_right
- media_player.owntone_output_anthony_s_nightstand
- media_player.owntone_output_soundbar
action: homeassistant.reload_config_entry
- target:
entity_id: button.desktop_pc_satellite_restart_iotlink
data: {}
action: button.press
- data: {}
target:
entity_id: automation.ac_controls
action: automation.turn_on
- if:
- condition: state
entity_id: media_player.owntone_output_bathroom
state: 'on'
- condition: state
entity_id: light.bathroom_lights
state: 'off'
then:
- data: {}
target:
entity_id: media_player.owntone_output_bathroom
action: media_player.turn_off
- if:
- condition: or
conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- condition: state
entity_id: input_select.anthony
state: Just Arrived
- condition: not
conditions:
- condition: state
entity_id: media_player.spotify_anthony221121
state: playing
- condition: state
entity_id: media_player.spotify_anthony221121
state: unavailable
then:
- target:
entity_id: script.lofi
data: {}
action: script.turn_on
- parallel:
- alias: refresh doorbell cam tablet
data:
browser_id: []
action: browser_mod.refresh
- alias: refresh medicine tablet
data:
browser_id: []
action: browser_mod.refresh
- alias: refresh food tablet
data:
browser_id: []
action: browser_mod.refresh
- alias: refresh bedroom tablet
data:
browser_id: []
action: browser_mod.refresh
initial_state: true
mode: single
- id: '1620642299524'
alias: Motion Bypass Control
description: Turn lights on if bed motion sensing bypass is enabled
trigger:
- platform: state
entity_id: input_boolean.bedmotion
to: 'on'
condition:
- condition: state
entity_id: light.fan_lights
state: 'off'
action:
- service: script.morning
data: {}
mode: single
- id: '1621577255605'
alias: Left Home
description: Turns bedroom off when leaving home, and ensures bedroom stays off
trigger:
- platform: state
entity_id:
- input_select.anthony
from: Home
to: Just Left
- platform: state
entity_id:
- input_select.taylor_presence
from: Home
to: Just Left
condition:
- condition: template
value_template: '{{states(''person.anthony'') != ''home''}}'
- condition: not
conditions:
- condition: or
conditions:
- condition: state
entity_id: person.anthony
state: unavailable
- condition: state
entity_id: person.anthony
state: unknown
- condition: state
entity_id: person.taylor
state: home
action:
- parallel:
- data: {}
target:
entity_id: script.night
alias: Turn off room
action: script.turn_on
- data: {}
target:
entity_id: timer.ac
action: timer.cancel
- data: {}
target:
entity_id:
- input_boolean.bedmotion
- switch.ac
- input_boolean.privacy
- media_player.owntone_server
- switch.brtv
action: homeassistant.turn_off
- if:
- condition: numeric_state
entity_id: zone.home
below: 1
alias: If home empty
- condition: not
conditions:
- condition: state
entity_id: binary_sensor.back_door
state: 'on'
alias: And back door closed
then:
- data: {}
target:
entity_id:
- light.living_room_lights
- light.kitchen_lights
- light.hallway_lights
- light.bathroom_lights
- switch.living_room_fan
- switch.laundry_room_light
- light.living_room_fan
- switch.guesttv
action: homeassistant.turn_off
- if:
- condition: state
entity_id: media_player.owntone_server
state: playing
then:
- data: {}
action: script.stop_music
alias: If home empty, turn off
- if:
- condition: state
entity_id: switch.exhaust_fan
state: 'on'
alias: If exhaust fan on
- condition: state
entity_id: timer.exhaust
state: idle
alias: And Timer not running
then:
- data:
duration: 0
target:
entity_id: timer.exhaust
alias: Start timer
action: timer.start
alias: Start exhaust fan timer if not running
- target:
entity_id: select.home_current_mode
data:
option: away
enabled: false
action: select.select_option
- target:
device_id: 1807d01837ccf4f85178b48dd72b10f6
data: {}
action: eight_sleep.side_off
mode: single
- id: '1627443167507'
alias: Bedroom Alerts
description: ''
trigger:
- platform: state
entity_id: binary_sensor.bedroom_door
to: 'on'
id: Motion
- platform: state
entity_id: binary_sensor.closet
from: 'off'
to: 'on'
id: closetopen
- platform: state
entity_id: binary_sensor.closet
from: 'on'
to: 'off'
id: closetclosed
condition:
- condition: not
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- condition: state
entity_id: input_select.anthony
state: Just Arrived
action:
- choose:
- conditions:
- condition: trigger
id: closetopen
sequence:
- service: notify.mobile_app_iphone
data:
message: Bedroom closet has been opened
title: Motion detected in bedroom
data:
group: bedroom
- conditions:
- condition: trigger
id: Motion
sequence:
- service: notify.mobile_app_iphone
data:
message: Bedroom door has been opened
title: Motion detected in bedroom
data:
group: bedroom
- conditions:
- condition: trigger
id: closetclosed
sequence:
- service: notify.mobile_app_iphone
data:
message: Bedroom closet has been closed
title: Motion detected in bedroom
data:
group: bedroom
default: []
mode: single
- id: '1627778209718'
alias: Presence Detection
description: ''
trigger:
- platform: state
entity_id:
- input_select.anthony
to: Just Arrived
for:
hours: 0
minutes: 40
seconds: 0
id: Home
- platform: state
entity_id: input_select.anthony
id: Away
to: Just Left
for: 00:10:00
- platform: state
entity_id:
- person.anthony
to: home
id: Just Arrived
- platform: state
entity_id:
- person.anthony
from: home
id: Just Left
- platform: state
entity_id:
- person.anthony
to: utd
id: utd
- platform: state
entity_id:
- person.anthony
to: raytheon
id: raytheon
condition:
- condition: not
conditions:
- condition: state
entity_id: person.anthony
state: unavailable
- condition: not
conditions:
- condition: state
entity_id: person.anthony
state: unknown
action:
- choose:
- conditions:
- condition: trigger
id: Home
sequence:
- service: input_select.select_option
target:
entity_id: input_select.anthony
data:
option: Home
- conditions:
- condition: or
conditions:
- condition: trigger
id: Away
- condition: trigger
id: raytheon
- condition: trigger
id: utd
sequence:
- service: input_select.select_option
target:
entity_id: input_select.anthony
data:
option: Away
- conditions:
- condition: trigger
id: Just Arrived
sequence:
- condition: not
conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- service: input_select.select_option
target:
entity_id: input_select.anthony
data:
option: Just Arrived
- conditions:
- condition: trigger
id: Just Left
sequence:
- service: input_select.select_option
target:
entity_id: input_select.anthony
data:
option: Just Left
default: []
mode: single
- id: '1627779396737'
alias: Door Opened
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.bedroom_door
to: 'on'
from: 'off'
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.anthony
state: Just Arrived
sequence:
- parallel:
- service: script.turn_on
data: {}
target:
entity_id:
- script.morning
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.owntone_server
state: playing
alias: not playing
then:
- service: script.turn_on
data: {}
target:
entity_id: script.lofi
alias: Play music
else:
- condition: template
value_template: "{{ not (state_attr('media_player.spotify_anthony221121',
'media_playlist') \n is defined and \n state_attr('media_player.spotify_anthony221121',
'media_playlist') \n is not none and not 'lofi' in \n state_attr('media_player.spotify_anthony221121',
'media_playlist')) \n and state_attr('media_player.spotify_anthony221121',
'volume_level') < 0.16}}"
alias: If playing
- service: media_player.volume_set
data:
volume_level: 0.13
target:
entity_id: media_player.spotify_anthony221121
- repeat:
count: '3'
sequence:
- service: media_player.volume_set
data:
volume_level: 0.13
target:
entity_id:
- media_player.owntone_output_anthony_s_desk
- service: media_player.volume_set
data:
volume_level: 0.26
target:
entity_id:
- media_player.owntone_output_anthony_s_nightstand
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- if:
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.bedroom_temperature
above: 68
- condition: numeric_state
entity_id: climate.bedroom_ac
above: 68
attribute: current_temperature
- condition: numeric_state
entity_id: sensor.bedroom_humidity
above: 55
- condition: numeric_state
entity_id: weather.dark_sky
attribute: temperature
above: 69
alias: Hot
then:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.ac_boost
- service: media_player.turn_off
data: {}
target:
entity_id:
- media_player.owntone_output_kitchen_right
- media_player.owntone_output_kitchen_left
- media_player.kitchen_speakers
- conditions:
- condition: state
entity_id: input_select.anthony
state: Home
- condition: time
after: 07:00:00
before: 01:00:00
- condition: state
entity_id: light.wled
state: 'on'
sequence:
- parallel:
- choose:
- conditions:
- condition: state
entity_id: light.fan_lights
state: 'off'
sequence:
- service: script.turn_on
continue_on_error: true
data: {}
target:
entity_id: script.color_loop
- condition: state
entity_id: binary_sensor.webcam
state: 'off'
- service: light.turn_on
continue_on_error: true
target:
entity_id:
- light.shapes_007f
- light.shapes_ee82
- light.shapes_4948
data:
brightness_pct: 100
- conditions:
- condition: state
entity_id: light.shapes_007f
state: 'on'
- condition: state
entity_id: binary_sensor.webcam
state: 'off'
sequence:
- service: light.turn_on
continue_on_error: true
target:
entity_id:
- light.shapes_007f
- light.shapes_ee82
- light.shapes_4948
data:
brightness_pct: 100
default: []
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.bedmotion
- service: media_player.turn_off
data: {}
target:
entity_id:
- media_player.owntone_output_kitchen_left
- media_player.owntone_output_kitchen_right
- media_player.kitchen_speakers
- service: automation.turn_on
target:
entity_id: automation.bed_occupancy
data: {}
default: []
mode: single
- id: '1644476253725'
alias: Bed Occupancy Detected
description: If motion detected in bed under certain circumstances, turn off overhead
lights.
trigger:
- platform: state
entity_id:
- binary_sensor.bed_occupancy
to: 'on'
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: state
entity_id: input_boolean.bedmotion
state: 'off'
action:
- choose:
- conditions:
- condition: time
before: 06:00:00
after: '22:00:00'
- condition: state
entity_id: light.wled
state: 'on'
- condition: state
entity_id: binary_sensor.webcam
state: 'on'
- condition: state
entity_id: binary_sensor.discord_active
state: 'on'
- condition: state
entity_id: switch.desktop
state: 'on'
- alias: not playing steam game
condition: template
value_template: '{{ is_state(''sensor.steam_76561198069805211'', ''unavailable'')
or state_attr(''sensor.steam_76561198069805211'', ''game'') == None }}'
sequence:
- if:
- condition: state
entity_id: binary_sensor.bedroom_chair
state: 'on'
then:
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.bed_occupancy
to: 'on'
for:
hours: 0
minutes: 0
seconds: 10
continue_on_timeout: false
- service: script.turn_on
data: {}
target:
entity_id: script.call
alias: night call
default:
- parallel:
- if:
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.bedroom_temperature
above: 68
- condition: numeric_state
entity_id: climate.bedroom_ac
above: 68
attribute: current_temperature
- condition: numeric_state
entity_id: sensor.bedroom_humidity
above: 55
alias: Hot
- condition: or
conditions:
- condition: numeric_state
entity_id: climate.home
attribute: current_temperature
above: 70
- condition: numeric_state
entity_id: weather.dark_sky
attribute: temperature
above: 65
then:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.ac
alias: turn on ac
- if:
- condition: state
entity_id: light.fan_lights
state: 'on'
then:
- service: script.turn_on
data: {}
target:
entity_id: script.fan_off
alias: Fan Lights Off
- alias: if home alone, turn off stuff
if: