-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
701 lines (701 loc) · 18.7 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
office_on:
sequence:
- service: light.turn_on
target:
entity_id:
- light.desk_lamp
- light.office_floor_lamp
- light.office_corner_lamp
- light.hue_play_bar
data:
color_temp: 350
brightness: 255
- service: light.turn_on
data:
brightness: 200
target:
entity_id: light.man_cave_ceiling_light
mode: restart
alias: Office On
office_off:
alias: Office Off
sequence:
- service: light.turn_off
target:
entity_id:
- light.hue_play_bar
- light.desk_lamp
- light.office_floor_lamp
- light.office_corner_lamp
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- condition: state
entity_id: light.hue_play_bar
state: 'off'
- service: light.turn_off
target:
entity_id: light.man_cave_ceiling_light
mode: restart
bias_light_on:
alias: Bias Light on
sequence:
- service: light.turn_on
target:
entity_id: light.livingroom_bias_light
data:
transition: 5
brightness: 175
data_template:
color_temp: "{% if (states.sensor.decimal_time.state | round(2)) <= 05.00 %}\n\
\ 500\n{% elif (states.sensor.decimal_time.state | round(2)) <= 09.50 %}\n\
\ 200\n{% elif (states.sensor.decimal_time.state | round(2)) >= 22.25 %}\n\
\ 500\n{% elif states.sun.sun.attributes.elevation < 8 %}\n 300\n{% elif\
\ (states.sensor.decimal_time.state | round(2)) > 9.50 %}\n 250\n{% else\
\ %}\n 300\n{% endif %}\n"
mode: restart
goodnight:
alias: Goodnight
sequence:
- service: light.turn_on
target:
entity_id:
- light.pantry
- light.livingroom
data:
transition: 60
brightness: 127
- service: climate.set_temperature
target:
entity_id: climate.downstairs_hallway
data:
target_temp_high: 72
target_temp_low: 66
hvac_mode: auto
- service: script.media_players_off
- service: lock.lock
target:
entity_id:
- lock.front_door
- lock.back_door
- service: cover.close_cover
target:
entity_id: cover.garage_door_opener
- service: light.turn_off
target:
entity_id: light.livingroom_bias_light
- service: script.fan_off
- service: light.turn_off
target:
entity_id:
- light.foyer
- light.dining_room
- light.recessed_lights
- light.mancave
data:
transition: 30
- service: switch.turn_off
target:
entity_id:
- switch.overhead_light
- switch.chandelier
- switch.christmas_lights
- switch.patio_lights
- service: script.whitenoise
- service: light.turn_on
target:
entity_id: light.master_bedroom
data:
transition: 30
color_temp: 500
data_template:
brightness: "{% if states.light.master_bedroom.state == 'off' %}\n 50\n{% elif\
\ states.light.master_bedroom.attributes.brightness|int < 50 %}\n 50\n{%\
\ else %}\n 100\n{% endif %}\n"
- service: switch.turn_off
target:
entity_id: switch.christmas_lights
- wait_for_trigger:
- platform: state
entity_id: light.master_bedroom
to: 'off'
timeout: 00:05:00
- condition: template
value_template: '{{ states.light.livingroom.attributes.brightness < 255 }}'
- service: light.turn_off
target:
entity_id:
- light.cabinet_lights
- light.livingroom
- service: light.turn_on
target:
entity_id: light.pantry
data:
brightness: 50
transition: 60
mode: single
whitenoise:
alias: Whitenoise
sequence:
- condition: state
state: home
entity_id: group.tristal
- service: media_player.turn_on
target:
entity_id: media_player.master_suite
- service: media_player.volume_set
data:
volume_level: 0.3
target:
entity_id: media_player.master_suite
- service: media_player.play_media
entity_id: media_player.master_suite
data:
media_content_type: audio/mp3
data_template:
media_content_id: "{% if states.sensor.whitenoise.state == '1' %}\n http://smrtho.us/storage/whitenoise1.mp3\n\
{% elif states.sensor.whitenoise.state == '2' %}\n http://smrtho.us/storage/whitenoise2.mp3\n\
{% elif states.sensor.whitenoise.state == '3' %}\n http://smrtho.us/storage/whitenoise3.mp3\n\
{% else %}\n http://smrtho.us/storage/whitenoise1.mp3\n{% endif %}\n"
mode: single
cabinet_lights_weekday:
sequence:
- service: light.turn_on
entity_id: light.cabinet_lights
data_template:
brightness: '{{ states.sensor.brightness_lr.state | int }}'
color_temp: "{% if states.input_boolean.movie_mode.state == true %}\n 450\n\
{% elif (states.sensor.decimal_time.state | round(2)) <= 05.00 %}\n 450\n\
{% elif (states.sensor.decimal_time.state | round(2)) <= 09.50 %}\n 200\n\
{% elif (states.sensor.decimal_time.state | round(2)) >= 22.25 %}\n 450\n\
{% elif states.sun.sun.attributes.elevation < 8 %}\n 366\n{% elif (states.sensor.decimal_time.state\
\ | round(2)) > 9.50 %}\n 300\n{% else %}\n 366\n{% endif %}\n"
mode: single
alias: Cabinet Lights Weekday
cabinet_lights_weekend:
alias: Cabinet Lights Weekend
sequence:
- service: light.turn_on
entity_id: light.cabinet_lights
data:
xy_color:
- 0.1605
- 0.3299
data_template:
brightness: '{{ states.sensor.brightness_lr.state | int }}'
mode: single
fan_on:
alias: Fan On
sequence:
- condition: state
entity_id: input_boolean.fan_check
state: 'on'
- condition: state
entity_id: fan.fan
state: 'off'
- service: input_boolean.turn_off
target:
entity_id: input_boolean.fan_check
- service: fan.turn_on
target:
entity_id: fan.fan
mode: single
fan_off:
alias: Fan Off
sequence:
- condition: state
entity_id: input_boolean.fan_check
state: 'off'
- condition: state
entity_id: fan.fan
state: 'on'
- service: input_boolean.turn_on
target:
entity_id: input_boolean.fan_check
- service: fan.turn_off
target:
entity_id: fan.fan
mode: single
master_bedroom_on:
alias: Master Bedroom ON
sequence:
- service: light.turn_on
target:
entity_id: light.master_bedroom
data_template:
color_temp: "{% if (states.sensor.decimal_time.state | round(2)) <= 05.00 %}\n\
\ 500\n{% elif (states.sensor.decimal_time.state | round(2)) <= 09.50 %}\n\
\ 200\n{% elif (states.sensor.decimal_time.state | round(2)) >= 22.25 %}\n\
\ 500\n{% elif states.sun.sun.attributes.elevation < 8 %}\n 366\n{% elif\
\ (states.sensor.decimal_time.state | round(2)) > 9.50 %}\n 300\n{% else\
\ %}\n 366\n{% endif %}\n"
brightness: "{% if states.sensor.decimal_time.state | int > 6 and states.sensor.decimal_time.state\
\ |int < 22 %}\n 254\n{% else %}\n 150\n{% endif %}\n"
mode: single
livingroom_on:
alias: Living Room ON
sequence:
- service: light.turn_on
target:
entity_id: light.livingroom
data:
brightness: 255
data_template:
color_temp: "{% if (states.sensor.decimal_time.state | round(2)) <= 05.00 %}\n\
\ 500\n{% elif (states.sensor.decimal_time.state | round(2)) < 09.50 %}\n\
\ 200\n{% elif (states.sensor.decimal_time.state | round(2)) >= 22.25 %}\n\
\ 500\n{% elif states.sun.sun.attributes.elevation < 8 %}\n 366\n{% elif\
\ (states.sensor.decimal_time.state | round(2)) >= 9.50 %}\n 300\n{% else\
\ %}\n 366\n{% endif %}\n \n"
mode: single
media_players_off:
alias: Media Players Off
sequence:
- service: media_player.turn_off
entity_id:
- media_player.shield_tv
- media_player.vizio_m70_smartcast
- media_player.livingroom_assistant
- media_player.tristans_clock
- media_player.crystals_clock
- media_player.bathroom_assistant
- media_player.mancave_assistant
- media_player.she_shed_assistant
- media_player.nursery_assistant
- media_player.dining_room_speaker
- media_player.kitchen_display
- media_player.nursery_tv
- media_player.vizio_v50_smartcast
- media_player.garage_speaker
mode: single
goodbye:
alias: Goodbye
sequence:
- service: lock.lock
target:
entity_id:
- lock.front_door
- lock.back_door
- service: media_player.volume_set
target:
entity_id: media_player.all_speakers
data:
volume_level: 0.4
- condition: state
entity_id: input_boolean.away_mode
state: 'off'
- service: cover.open_cover
target:
entity_id: cover.garage_door_opener
- service: light.turn_off
target:
entity_id: light.livingroom_bias_light
- service: media_player.turn_off
target:
entity_id: media_player.shield_tv
- service: script.media_players_off
mode: single
close_garage:
alias: close garage
sequence:
- service: cover.close_cover
target:
entity_id: cover.garage_door_opener
mode: single
open_garage:
alias: open garage
sequence:
- condition: state
entity_id: input_boolean.away_mode
state: 'off'
- service: cover.open_cover
target:
entity_id: cover.garage_door_opener
mode: single
home:
alias: home
sequence:
- service: cover.close_cover
target:
entity_id: cover.garage_door_opener
- service: automation.trigger
target:
entity_id: automation.home_mode
- service: media_player.turn_on
target:
entity_id: media_player.shield_tv
mode: single
living_room_evening:
alias: Living Room EVENING
sequence:
- condition: state
entity_id: input_boolean.movie_mode
state: 'off'
- service: light.turn_on
target:
entity_id: light.livingroom
data:
transition: 1800
color_temp: 366
- condition: state
entity_id: light.livingroom_bias_light
state: 'on'
- service: light.turn_on
target:
entity_id: light.livingroom_bias_light
data:
transition: 1800
color_temp: 300
brightness: 175
mode: single
master_bedroom_evening:
alias: Master Bedroom EVENING
sequence:
- condition: state
entity_id: input_boolean.away_mode
state: 'off'
- condition: state
entity_id: light.master_bedroom
state: 'on'
- service: light.turn_on
target:
entity_id: light.master_bedroom
data:
transition: 60
color_temp: 366
mode: single
living_room_bedtime:
alias: Living Room BEDTIME
sequence:
- condition: state
entity_id: input_boolean.movie_mode
state: 'off'
- service: light.turn_on
target:
entity_id: light.livingroom
data:
color_temp: 500
transition: 900
- condition: state
entity_id: light.livingroom_bias_light
state: 'on'
- service: light.turn_on
target:
entity_id: light.livingroom_bias_light
data:
transition: 900
color_temp: 500
brightness: 175
mode: single
master_bedroom_bedtime:
alias: Master Bedroom BEDTIME
sequence:
- condition: state
entity_id: input_boolean.away_mode
state: 'off'
- condition: state
entity_id: light.master_bedroom
state: 'on'
- service: light.turn_on
target:
entity_id: light.master_bedroom
data:
transition: 60
color_temp: 500
mode: single
good_morning:
alias: Good Morning
sequence:
- service: light.turn_on
target:
entity_id: light.recessed_lights
data:
brightness: 255
- service: light.turn_on
target:
entity_id: light.livingroom
data:
brightness: 255
data_template:
color_temp: "{% if (states.sensor.decimal_time.state | round(2)) <= 05.00 %}\n\
\ 500\n{% elif (states.sensor.decimal_time.state | round(2)) < 09.50 %}\n\
\ 200\n{% elif (states.sensor.decimal_time.state | round(2)) >= 22.25 %}\n\
\ 500\n{% elif states.sun.sun.attributes.elevation < 8 %}\n 366\n{% elif\
\ (states.sensor.decimal_time.state | round(2)) >= 9.50 %}\n 300\n{% else\
\ %}\n 366\n{% endif %}\n \n"
- service: lock.unlock
target:
entity_id: lock.back_door
- service: script.fan_on
- choose:
- conditions:
- condition: sun
before: sunrise
before_offset: 00:30:00
sequence:
- service: switch.turn_on
target:
entity_id: switch.patio_lights
default: []
mode: single
pantry:
alias: Pantry
sequence:
- service: light.turn_on
target:
entity_id: light.pantry
data_template:
brightness: "{% if (states.sensor.decimal_time.state | round(2)) <= 01.50 %}\n\
\ 00\n{% elif (states.sensor.decimal_time.state | round(2)) <= 06.83 %}\n\
\ 50\n{% elif (states.sensor.decimal_time.state | round(2)) <= 22.00 %}\n\
\ 255\n{% elif (states.sensor.decimal_time.state | round(2)) >= 22.00 %}\n\
\ 50\n{% else %}\n 255\n{% endif %}\n"
mode: single
revert:
alias: Revert
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.foyer
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 300
brightness: 255
- service: light.turn_off
target:
entity_id: light.foyer
default: []
- choose:
- conditions:
- condition: state
entity_id: media_player.vizio_m70_smartcast
state: 'on'
sequence:
- service: script.bias_light_on
- conditions:
- condition: state
entity_id: media_player.vizio_m70_smartcast
state: 'off'
sequence:
- service: light.turn_off
target:
entity_id: light.livingroom_bias_light
default: []
- choose:
- conditions:
- condition: state
entity_id: light.dining_room
state: 'on'
sequence:
- service: light.turn_on
target:
entity_id: light.dining_room
data:
color_temp: 300
brightness: 255
- service: light.turn_off
target:
entity_id: light.dining_room
default: []
- choose:
- conditions:
- condition: state
entity_id: input_boolean.movie_mode
state: 'on'
sequence:
- service: automation.turn_on
target:
entity_id: automation.movie_mode_on
- conditions:
- condition: state
entity_id: input_boolean.movie_mode
state: 'off'
- condition: state
entity_id: light.livingroom
state: 'on'
sequence:
- service: script.livingroom_on
- choose:
- conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
sequence:
- service: script.cabinet_lights_weekday
- conditions:
- condition: time
weekday:
- sat
- sun
sequence:
- service: script.cabinet_lights_weekend
default: []
- conditions:
- condition: state
entity_id: input_boolean.movie_mode
state: 'off'
- condition: state
entity_id: light.livingroom
state: 'off'
sequence:
- service: script.livingroom_on
- service: light.turn_off
target:
entity_id: light.livingroom
default: []
- choose:
- conditions:
- condition: state
entity_id: light.master_bedroom
state: 'on'
sequence:
- service: script.master_bedroom_on
- conditions:
- condition: state
entity_id: light.master_bedroom
state: 'off'
sequence:
- service: script.master_bedroom_on
- service: light.turn_off
target:
entity_id: light.master_bedroom
default: []
- choose:
- conditions:
- condition: state
entity_id: light.pantry
state: 'on'
sequence:
- service: script.pantry
default: []
- choose:
- conditions:
- condition: numeric_state
entity_id: sun.sun
below: '8'
sequence:
- service: light.turn_on
target:
entity_id: light.exterior
data:
brightness_pct: 255
- conditions:
- condition: numeric_state
entity_id: sun.sun
above: '8'
sequence:
- service: light.turn_off
target:
entity_id: light.exterior
default: []
- choose:
- conditions:
- condition: numeric_state
entity_id: sun.sun
below: '8'
- condition: time
before: 00:00:00
sequence:
- service: switch.turn_on
target:
entity_id: switch.patio_lights
- conditions:
- condition: numeric_state
entity_id: sun.sun
below: '8'
- condition: time
after: 00:00:00
sequence:
- service: switch.turn_off
target:
entity_id: switch.patio_lights
default: []
mode: single
jensens_bedtime:
alias: Jensen's Bedtime
sequence:
- service: light.turn_on
target:
entity_id: light.led_light_strip
data:
color_temp: 500
brightness: 50
- service: light.turn_off
target:
entity_id: light.ceiling_light
data:
transition: 60
- service: media_player.turn_off
target:
entity_id: media_player.nursery_tv
- service: media_player.play_media
entity_id: media_player.nursery_assistant
data:
media_content_type: audio/mp3
data_template:
media_content_id: "{% if states.sensor.whitenoise.state == '1' %}\n http://smrtho.us/storage/whitenoise1.mp3\n\
{% elif states.sensor.whitenoise.state == '2' %}\n http://smrtho.us/storage/whitenoise2.mp3\n\
{% elif states.sensor.whitenoise.state == '3' %}\n http://smrtho.us/storage/whitenoise3.mp3\n\
{% else %}\n http://smrtho.us/storage/whitenoise1.mp3\n{% endif %}\n"
mode: single
go_tigers_go:
sequence:
- service: media_player.volume_mute
data:
is_volume_muted: true
target:
entity_id: media_player.shield_tv
- service: media_player.volume_set
data:
volume_level: 0.5
target:
entity_id: media_player.party_mode
- service: media_player.play_media
data:
media_content_id: http://smrtho.us/storage/GoTigersGo.mp3
media_content_type: audio/mp3
target:
entity_id: media_player.party_mode
- service: light.turn_on
data:
color_name: blue
target:
entity_id:
- light.livingroom
- light.livingroom_bias_light
- light.cabinet_lights
- delay:
hours: 0
minutes: 1
seconds: 17
milliseconds: 0
- service: media_player.volume_mute
target:
entity_id: media_player.shield_tv
data:
is_volume_muted: false
- service: script.revert
mode: single
alias: Go tigers go
tiger_timer:
alias: tiger timer
sequence:
- delay:
hours: 0
minutes: 1
seconds: 17
milliseconds: 0
- service: script.revert
- service: media_player.volume_mute
target:
entity_id: media_player.shield_tv
mode: single