-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
3050 lines (3025 loc) · 86.3 KB
/
scripts.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
give_me_darkness:
alias: Give Me Darkness
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.give_me_darkness
alias: Turn on input boolean
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- service: script.volume_reset
data: {}
- service: script.evening_on_first_floor
data:
give_me_darkness: 1
- service: script.evening_on_second_floor
data: {}
- service: mqtt.publish
data:
qos: '2'
retain: true
topic: house/time/give_me_darkness
payload: 'on'
- alias: Security decision
if:
- condition: and
conditions:
- condition: state
entity_id: person.tony_stork
state: home
- condition: state
entity_id: person.christina_stork
state: home
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: state
entity_id: alarm_control_panel.nerdhome_alarm_panel
state: disarmed
alias: Both adults are home, guest mode off, security disarmed
then:
- alias: Auto or manual trigger?
if:
- condition: template
value_template: '{{ auto == 1 }}'
alias: Triggered by automation
then:
- service: alarm_control_panel.alarm_arm_home
data: {}
target:
entity_id: alarm_control_panel.nerdhome_alarm_panel
alias: Arm security
else:
- service: script.activate_alexa_actionable_notification
data:
text: <voice name='Joanna'><prosody rate='150%'>Would you like me to arm
the security system?</prosody></voice>
event_id: actionable_notification_night_security_arm
alexa_device: media_player.living_room_echo_dot
alias: Ask to arm security
mode: single
icon: mdi:weather-night
alexa_tts_test:
alias: Alexa TTS Test
sequence:
- service: notify.alexa_media
data:
data:
method: all
type: announce
target: Living Room Echo Dot
message: I farted
mode: single
icon: mdi:test-tube
kallen_timer_cancel:
sequence:
- service: timer.cancel
target:
entity_id: timer.kallen_timer
mode: single
alias: Kallen Timer - Cancel
icon: mdi:cancel
global_off:
alias: Global Off
sequence:
- service: light.turn_off
data: {}
target:
entity_id: all
- service: fan.turn_off
data: {}
target:
entity_id: all
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.tina_desk_lights
mode: single
icon: mdi:earth-off
global_on:
alias: Global On
sequence:
- service: light.turn_on
data: {}
target:
entity_id: all
mode: single
icon: mdi:earth
max_brightness:
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
alias: Turn on Tina Desk Lights
- alias: Turn off Adaptive Lighting and Motion Lighting
service: switch.turn_off
data: {}
target:
label_id:
- adaptive_lighting
- motion_lighting
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- alias: Cancel motion timers
service: timer.cancel
data: {}
target:
label_id: motion_lighting
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.front_porch_light_on
alias: Turn off Front Porch automation
- service: light.turn_on
data:
kelvin: 5000
brightness_pct: 100
target:
entity_id: all
alias: Turn on ALL LIGHTS to maximum brightness
mode: single
alias: Max Brightness
icon: mdi:brightness-7
going_upstairs:
alias: Going Upstairs
sequence:
- service: mqtt.publish
data:
qos: '2'
retain: true
topic: house/time/night_mode
payload: 'on'
alias: Tell MQTT that it is night mode now
- service: input_select.select_option
data:
option: Adaptive
target:
entity_id:
- input_select.basement_studio_scenes
- input_select.tina_lamp_scenes
- input_select.mud_room_scenes
- input_select.living_room_scenes
alias: Set scenes
- service: input_boolean.turn_on
entity_id: input_boolean.night_mode
alias: Turn on Night Mode
- alias: Turn off Studio Quiet and Gaming Mode
service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.studio_quiet
- input_boolean.gaming_mode
- alias: Thermostat reminder
if:
- alias: If triggered from basement
condition: state
entity_id: sensor.last_alexa_name
state: Basement Echo Dot
then:
- alias: Remind in basement
service: script.speech_engine
data:
who: basement
message: Remember to set the thermostat for the night
type: alert
else:
- alias: Remind in living room
service: script.speech_engine
data:
who: living_room
message: Remember to set the thermostat for the night
type: alert
enabled: false
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.basement_tv
state: playing
then:
- service: media_player.turn_off
target:
entity_id: media_player.basement_tv
data: {}
alias: Turn basement TV off, unless something is playing
- if:
- condition: state
entity_id: input_boolean.kallen_computer_updates
state: 'off'
then:
- service: script.kallen_desktop_shutdown
data: {}
alias: Shut down Kallen desktop
alias: Shutdown Kallen Desktop, unless it is updating
- choose:
- conditions:
- condition: state
entity_id: sensor.last_alexa_name
state: Living Room Echo Dot
alias: If triggered from living room
sequence:
- service: script.activate_alexa_actionable_notification
data:
text: <voice name='Joanna'><prosody rate='150%'>Would you like me to shut
down your computer?</prosody></voice>
event_id: actionable_notification_shutdown_computer
alexa_device: media_player.living_room_echo_dot
response_variable: shutdown
alias: Ask in living room
- conditions:
- condition: state
entity_id: sensor.last_alexa_name
state: Master Bedroom Echo Dot
alias: If triggered from master bedroom
sequence:
- service: script.activate_alexa_actionable_notification
data:
text: <voice name='Joanna'><prosody rate='150%'>Would you like me to shut
down your computer?</prosody></voice>
event_id: actionable_notification_shutdown_computer
alexa_device: media_player.master_bedroom_echo_dot
response_variable: shutdown
alias: Ask in master bedroom
default:
- service: script.activate_alexa_actionable_notification
data:
text: <voice name='Joanna'><prosody rate='150%'>Would you like me to shut
down your computer?</prosody></voice>
event_id: actionable_notification_shutdown_computer
alexa_device: media_player.basement_echo_dot
response_variable: shutdown
alias: Ask in basement
alias: Ask about shutting down main computer
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.basement_studio_door
from: 'off'
to: 'on'
id: door
- platform: state
entity_id:
- input_boolean.goodnight
from: 'off'
to: 'on'
id: goodnight
- platform: state
entity_id: light.master_bedroom_lights
to: 'on'
id: lights
timeout:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
alias: Figure out where I am
- service: light.turn_off
data: {}
target:
entity_id: light.basement_studio_lights
alias: Turn off the lights
- service: input_datetime.set_datetime
data:
datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0,2)
}}
'
target:
entity_id: input_datetime.tony_night_meds_notify
alias: Schedule the night meds notification
- if:
- condition: template
value_template: '{{ wait.trigger.id in [''goodnight'',''lights''] }}'
then:
- service: script.text_notify
data:
type: alert
who: tony
title: Basement Shutdown
message: Would you like me to shut down your computer?
tag: going-upstairs-pc-shutdown
actions:
- action: GU_PC_SHUTDOWN_YES
title: Shutdown
- action: GU_PC_SHUTDOWN_LOCK
title: Lock
- action: GU_PC_SHUTDOWN_NOTHING
title: Do Nothing
alias: Send an actionable notification
- wait_for_trigger:
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: GU_PC_SHUTDOWN_YES
id: shutdown-yes
alias: Shutdown Yes
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: GU_PC_SHUTDOWN_LOCK
id: shutdown-lock
alias: Shutdown Lock
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: GU_PC_SHUTDOWN_NOTHING
alias: Shutdown Nothing
id: shutdown-nothing
timeout:
hours: 0
minutes: 20
seconds: 0
milliseconds: 0
alias: Wait for response to notification
- choose:
- conditions:
- condition: template
value_template: '{{ wait.trigger.id == ''shutdown-yes'' }}'
sequence:
- service: script.tony_desktop_shutdown
data: {}
- conditions:
- condition: template
value_template: '{{ wait.trigger.id == ''shutdown-lock'' }}'
sequence:
- service: script.tony_desktop_lock
data: {}
alias: Run the desired action
- service: script.text_notify
data:
type: alert
who: tony
message: clear_notification
tag: going-upstairs-pc-shutdown
alias: Clear the notification
- stop: Automation steps skipped
alias: If I was not in the basement, ask about shutdown via text and then skip
the rest
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.upstairs_bathroom_motion
to: 'on'
id: bathroom
- platform: state
entity_id:
- input_boolean.goodnight
to: 'on'
id: goodnight
- platform: state
entity_id:
- light.master_bedroom_lights
to: 'on'
id: lights
continue_on_timeout: false
timeout:
hours: 0
minutes: 20
seconds: 0
milliseconds: 0
alias: Wait until I am in the bathroom, or in bed, or the lights are manually
turned on
- choose:
- conditions:
- condition: template
value_template: '{{ wait.trigger.id == ''bathroom'' }}'
sequence:
- service: input_select.select_option
data:
option: Side Nightlight
target:
entity_id: input_select.master_bedroom_scenes
- conditions:
- condition: template
value_template: '{{ wait.trigger.id in [''lights'',''goodnight''] }}'
sequence:
- variables:
stop_reason: '{{ wait.trigger.id }}'
- stop: Bedroom lighting not needed
response_variable: stop_reason
alias: Turn on lights, or not
mode: single
icon: hue:room-stairs
max_brightness_cleanup:
alias: Max Brightness Cleanup
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.front_porch_light_on
alias: Turn on Front Porch automation
- alias: Turn on Adaptive Lighting on front porch
service: switch.turn_on
target:
entity_id:
- switch.adaptive_lighting_front_porch
data: {}
- service: script.adaptive_on_first_floor
data: {}
alias: Adaptive on first floor
- service: script.adaptive_on_second_floor
data: {}
alias: Adaptive on second floor
- service: input_select.select_option
data:
option: Adaptive
target:
entity_id: input_select.basement_studio_scenes
alias: Set basement lights to adaptive
- service: switch.turn_on
metadata: {}
data: {}
target:
label_id: motion_lighting
alias: Turn on motion lighting
mode: single
icon: mdi:broom
cleanup_crash:
alias: Cleanup Crash
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.presence_simulation
- switch.basement_echo_dot_do_not_disturb_switch
- switch.living_room_echo_dot_do_not_disturb_switch
- switch.master_bedroom_echo_dot_do_not_disturb_switch
alias: Turn off switches
- if:
- condition: time
after: input_datetime.master_bedroom_wakeup
before: input_datetime.master_bedroom_cooling
then:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.master_bedroom_cooling_on
- service: button.press
data: {}
target:
entity_id: button.master_bedroom_day_mode
else:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.master_bedroom_cooling_on
- service: button.press
data: {}
target:
entity_id: button.master_bedroom_night_mode
alias: Set climate state
- if:
- condition: state
entity_id: sensor.twitch_ironnerd24
state: online
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.studio_quiet
else:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.studio_quiet
alias: Set studio quiet if Twitch stream is live
- if:
- condition: state
entity_id: calendar.family_tinawork
state: 'on'
- condition: time
before: input_datetime.tina_workday_end
after: input_datetime.tina_workday_start
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.work_today
else:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.work_today
alias: Set Tina Work booleans
- if:
- condition: state
entity_id: calendar.kallen_school_days
state: 'on'
- condition: time
before: input_datetime.kallen_school_day_end
after: input_datetime.kallen_school_day_start
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.kallen_school_today
- input_boolean.kallen_school_today_extended
- input_boolean.kallen_at_school
else:
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.kallen_school_today
- input_boolean.kallen_school_today_extended
- input_boolean.kallen_at_school
alias: Set Kallen School booleans
- if:
- condition: time
before: input_datetime.audible_notification_on
after: input_datetime.audible_notification_off
then:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.audible_notifications
else:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.audible_notifications
alias: Set audible notifications
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.adaptive_lighting_basement_studio
- switch.adaptive_lighting_downstairs_bathroom
- switch.adaptive_lighting_front_porch
- switch.adaptive_lighting_kallen_bedroom
- switch.adaptive_lighting_living_room
- switch.adaptive_lighting_master_bedroom
- switch.adaptive_lighting_mud_room
- switch.adaptive_lighting_tina_lamp
- switch.adaptive_lighting_emma_bedroom
- switch.adaptive_lighting_upstairs_bathroom
- switch.adaptive_lighting_upstairs_hallway
alias: Turn on all adaptive lighting
- service: input_text.set_value
data:
value: Adaptive
target:
entity_id:
- input_text.basement_studio_selected_scene
- input_text.downstairs_bathroom_selected_scene
- input_text.front_porch_selected_scene
- input_text.kallen_bedroom_selected_scene
- input_text.living_room_selected_scene
- input_text.master_bedroom_selected_scene
- input_text.mud_room_selected_scene
- input_text.emma_bedroom_selected_scene
- input_text.tina_lamp_selected_scene
- input_text.upstairs_bathroom_selected_scene
- input_text.upstairs_hallway_selected_scene
alias: Reset input texts to adaptive
- service: script.volume_reset
data: {}
alias: Reset all speaker volumes
- service: button.press
data: {}
target:
entity_id: button.cleanup
alias: Run Node-RED cleanup flow
mode: single
icon: mdi:truck-snowflake
basement_shutdown:
alias: Basement Shutdown
sequence:
- alias: Turn off any active modes
service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.studio_quiet
- input_boolean.recliner_mode
- input_boolean.gaming_mode
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.basement_tv
state:
- playing
then:
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.basement_tv
alias: If TV is not being used, turn it off
- if:
- condition: state
entity_id: input_boolean.kallen_computer_updates
state: 'off'
then:
- service: script.kallen_desktop_shutdown
data: {}
else:
- service: script.kallen_desktop_lock
data: {}
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.kallen_computer_updates
alias: Turn off Kallen Desktop unless updates are scheduled
- service: script.text_notify
data:
type: alert
who: tony
title: Basement Shutting Down
message: Would you like to shut down your computer?
tag: tony-pc-shutdown
actions:
- action: TONY_COMPUTER_SHUTDOWN
title: Shutdown
- action: TONY_COMPUTER_LOCK
title: Lock
- action: TONY_COMPUTER_IGNORE
title: Do Nothing
alias: Ask about shutting down main computer
response_variable: tony_computer
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.basement_studio_door
to: 'on'
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
alias: Wait for the door to open
- service: fan.turn_off
data: {}
target:
entity_id: fan.basement_fan
- service: light.turn_off
data: {}
target:
entity_id: light.basement_lights
alias: Turn off the lights
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.basement_studio_door
to: 'off'
for:
hours: 0
minutes: 0
seconds: 10
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
alias: Wait for the door to close
- service: timer.cancel
data: {}
target:
entity_id: timer.basement_studio_door_timer
alias: Cancel the door timer since the lights are already off
mode: restart
icon: mdi:power
adaptive_on_first_floor:
alias: Adaptive on First Floor
sequence:
- if:
- condition: state
entity_id: light.living_room_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.living_room_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_living_room
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
data: {}
- service: input_text.set_value
target:
entity_id: input_text.living_room_selected_scene
data:
value: Adaptive
alias: If living room lights are on
- if:
- condition: or
conditions:
- condition: state
entity_id: light.tina_lamp
state: 'on'
- condition: state
entity_id: light.tina_desk_strip
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Reset
alias: Set Adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_tina_lamp
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_tina_lamp
data: {}
alias: If Tina's desk lights are on
- if:
- condition: state
entity_id: light.downstairs_bathroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.downstairs_bathroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_downstairs_bathroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_downstairs_bathroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.downstairs_bathroom_selected_scene
data:
value: Adaptive
alias: If downstairs bathroom lights are on
- if:
- condition: state
entity_id: light.mud_room_overhead
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.mud_room_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_mud_room
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_mud_room
data: {}
- service: input_text.set_value
target:
entity_id: input_text.mud_room_selected_scene
data:
value: Adaptive
alias: If mud room light is on
mode: single
adaptive_on_second_floor:
alias: Adaptive on Second Floor
sequence:
- if:
- condition: state
entity_id: light.hallway_overhead
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_hallway_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_hallway
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_hallway
data: {}
- service: input_text.set_value
target:
entity_id: input_text.upstairs_hallway_selected_scene
data:
value: Adaptive
alias: If hallway light is on
- if:
- condition: state
entity_id: light.master_bedroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.master_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_master_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_master_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.master_bedroom_selected_scene
data:
value: Adaptive
alias: If master bedroom lights are on
- if:
- condition: state
entity_id: light.kallen_bedroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.kallen_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_kallen_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_kallen_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.kallen_bedroom_selected_scene
data:
value: Adaptive
alias: If Kallen's bedroom lights are on
- if:
- condition: state
entity_id: light.emma_bedroom_light
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.emma_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_emma_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_emma_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.emma_bedroom_selected_scene
data:
value: Adaptive
alias: If Emma's bedroom light is on
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- if:
- condition: state
entity_id: binary_sensor.upstairs_bathroom_occupied
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Adaptive
else:
- if:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
entity_id: light.upstairs_bathroom_lights
data: {}
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_bathroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.upstairs_bathroom_selected_scene
data:
value: Adaptive
alias: Upstairs bathroom handling
bright_on_first_floor:
alias: Bright on First Floor
sequence:
- service: light.turn_on
target:
entity_id:
- light.living_room_lights
- light.downstairs_bathroom_lights
- light.mud_room_overhead
data: {}
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- delay:
seconds: 1
- service: input_select.select_option
target:
entity_id:
- input_select.living_room_scenes
- input_select.downstairs_bathroom_scenes
- input_select.mud_room_scenes
data:
option: Bright
- service: light.turn_on
target:
entity_id:
- light.tina_desk_strip
- light.tina_lamp
data:
color_temp_kelvin: 2700
- service: light.turn_on
target:
entity_id:
- light.tina_lamp
- light.tina_desk_strip
data:
brightness: 255
bright_on_second_floor:
alias: Bright on Second Floor
sequence:
- service: light.turn_on
target:
entity_id:
- light.hallway_overhead
- light.master_bedroom_lights
data: {}
- if: