This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
automations.yaml
1345 lines (1342 loc) · 37.1 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: a_3dprinter_off
alias: "3D Printer Finish Off"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: sensor.octoprint_job_percentage
state: "100"
for:
minutes: 5
condition:
condition: or
conditions:
- condition: state
entity_id: switch.wemo_insight
state: "on"
- condition: state
entity_id: switch.strip_cord
state: "on"
action:
- service: switch.turn_off
data:
entity_id: switch.wemo_insight
- service: switch.turn_off
data:
entity_id: switch.strip_cord
- id: a_alarm_clock
alias: 'Alarm Clock'
trigger:
platform: template
value_template: '{{ states.sensor.time.state == states.sensor.alarm_time.state }}'
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.alarmweekday
state: 'on'
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: input_boolean.alarmweekday
state: 'off'
action:
- service: notify.ben
data_template:
message: "Alarm Clock Triggered"
data:
data:
tag: 'turn_off_alarm'
actions:
- action: "turn_off_alarm"
title: "Turn Off Alarm"
- service: light.lifx_set_state
data:
entity_id:
- light.floor_lamp
brightness: 255
color_name: "red"
transition: 10
- service: tts.google_say
entity_id:
- media_player.kitchen_home
- media_player.bedroom_home
data_template:
message: "Hello! The current time is {{ states.sensor.time.state }}."
- id: a_alarm_clock_off
alias: Alarm Clock Off
initial_state: True
hide_entity: False
trigger:
- platform: event
event_type: html5_notification.clicked
event_data:
action: turn_off_alarm
action:
- service: notify.ben
data:
title: "Alarm Clock Off"
message: "Have a great day!"
- service: light.lifx_set_state
data:
entity_id:
- light.floor_lamp
transition: 2
power: off
- id: a_alarm_escalated
alias: Alarm Escalate Automation
initial_state: True
hide_entity: False
trigger:
- platform: event
event_type: html5_notification.clicked
event_data:
action: activate_siren
action:
- service: notify.ben
data:
title: "ALARM SOUND"
message: "The alarm sound has been activated"
- service: tts.google_say
entity_id:
- media_player.kitchen_home
- media_player.bedroom_home
data_template:
message: "Alarm triggered by {{ trigger.entity_id }}. You weren't very sneaky! Please leave."
- id: a_alarm_triggered
alias: Alarm Trigger Automation
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: sensor.xandem
state: 'motion detected'
- platform: state
entity_id: sensor.blinds1_motionx
from: "standby"
to: "motion"
- platform: state
entity_id: sensor.blinds1_motiony
from: "standby"
to: "motion"
- platform: state
entity_id: sensor.blinds1_motionz
from: "standby"
to: "motion"
condition:
- condition: state
entity_id: alarm_control_panel.ha_alarm
state: armed_away
action:
- service: notify.ben
data_template:
message: "Alarm triggered"
data:
data:
tag: 'alarm_trigger'
actions:
- action: "activate_siren"
title: "activate siren"
- service: light.lifx_set_state
data:
entity_id:
- light.switch
- light.wall
- light.sink
- light.front_door_right
- light.front_door_left
- light.back_door
- light.floor_lamp
brightness: 255
color_name: "red"
- service: light.turn_on
data:
entity_id:
- light.porch_strip
#brightness: 255
#color_temp: 196
#rgb_color: [255,0,0]
effect: "Police All"
#transtion: 20
- id: a_animationspeedsliderjar
alias: "Porch Animation Speed"
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: input_slider.jar_animation_speed
action:
- service: mqtt.publish
data_template:
topic: "bruh/mqttjar/set"
payload: '{"transition":{{ trigger.to_state.state | int }}}'
- id: a_animationspeedsliderporch
alias: "Porch Animation Speed"
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: input_slider.porch_animation_speed
action:
- service: mqtt.publish
data_template:
topic: "bruh/porch/set"
payload: '{"transition":{{ trigger.to_state.state | int }}}'
- id: a_arlo_record_porch
alias: Arlo Record Porch Escalate Automation
initial_state: True
hide_entity: False
trigger:
- platform: event
event_type: html5_notification.clicked
event_data:
action: activate_siren
action:
- service: notify.ben
data:
title: "ALARM SOUND"
message: "The alarm sound has been activated"
- service: tts.google_say
entity_id:
- media_player.kitchen_home
- media_player.bedroom_home
data_template:
message: "Alarm triggered by {{ trigger.entity_id }}. You weren't very sneaky! Please leave."
- id: a_avr_input
alias: "AVR Input"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.avr_input
state: "Chromecast"
- platform: state
entity_id: input_select.avr_input
state: "KODI"
- platform: state
entity_id: input_select.avr_input
state: "HA"
- platform: state
entity_id: input_select.avr_input
state: "PC"
- platform: state
entity_id: input_select.avr_input
state: "Standby"
action:
- service: hdmi_cec.select_device
data_template:
device: >
{% if states.input_select.avr_input.state == 'Chromecast' %}
Chromecast
{% elif states.input_select.avr_input.state == 'KODI' %}
KODI
{% elif states.input_select.avr_input.state == 'HA' %}
HA
{% elif states.input_select.avr_input.state == 'PC' %}
PC
{% endif %}
- service_template: >
{% if is_state('input_boolean.tv_power', 'off') %}
input_boolean.turn_on
{% endif %}
entity_id: input_boolean.tv_power
- service: input_boolean.turn_off
data_template:
entity_id: >
{% if states.input_select.avr_input.state == 'Standby' %}
input_boolean.tv_power
{% endif %}
- id: a_awake
alias: "awake"
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: sensor.xandem
state: "motion detected"
condition:
- condition: template
value_template: "{% if states('input_select.ben_status') == 'Sleeping' or states('input_select.cailin_status') == 'Sleeping'%} true {% else %}false{% endif %}"
- condition: state
entity_id: input_boolean.sleep_lockout
state: "off"
- condition: sun
after: sunrise
after_offset: "-3:00:00"
action:
- service: input_select.select_option
data:
entity_id: input_select.ben_status
option: "Home"
- service: input_select.select_option
data:
entity_id: input_select.cailin_status
option: "Home"
- service: tts.google_say
entity_id: media_player.kitchen_home
data:
message: "Good morning!"
- id: a_away
alias: "Away Global Actions"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.ben_status
state: "Away"
- platform: state
entity_id: input_select.cailin_status
state: "Away"
condition:
- condition: template
value_template: "{% if states('input_select.ben_status') == 'Away' and states('input_select.cailin_status') == 'Away' %}true{% else %}false{% endif %}"
- condition: state
entity_id: input_boolean.presence_lockout
state: "off"
action:
- service: light.lifx_set_state
data:
entity_id:
- group.lab_lights_card
- group.kitchen_lights_card
- group.bedroom_lights_card
- group.bathroom_lights_card
transition: 15
power: off
- service: switch.turn_off
data:
entity_id:
- switch.fishstick
- switch.fan
- switch.camera_light
- switch.bedroom_lamp
- switch.monitor_light
- switch.wake_on_lan
- switch.homeseer_hsws100_wall_switch_switch_7_0
- service: alarm_control_panel.alarm_arm_away
- service: notify.ben
data_template:
title: "Away"
message: "BRUH is now set to away"
- id: a_away_ben
alias: "Away Ben"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.ben_status
from: "Home"
to: "Away"
action:
- service: notify.ben
data_template:
title: "Ben is Leaving"
message: "Ben is now {{states.input_select.ben_status.state}}"
- id: a_away_cailin
alias: "Away Cailin"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.cailin_status
from: "Home"
to: "Away"
action:
- service: notify.ben
data_template:
title: "Cailin is Leaving"
message: "Cailin is now {{states.input_select.cailin_status.state}}"
- id: a_backdoor_open
alias: "Back Door Open"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: sensor.back_door_sensor_template
from: "closed"
to: "open"
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.presence_lockout
state: "off"
- condition: state
entity_id: sun.sun
state: "below_horizon"
action:
- service: light.lifx_set_state
data:
entity_id:
- light.front_door_right
- light.front_door_left
- light.back_door
brightness: 255
color_temp: 200
power: on
transition: 5
- service: notify.ben
data_template:
title: "Back Door Open"
message: "Somebody took Caesium outside?"
- id: a_bathroom_condensation_on
alias: "bathroom fan control"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: sensor.bathroom_humidity
from: "low humidity"
to: "high humidity"
- platform: state
entity_id: sensor.bathroom_humidity
from: "high humidity"
to: "low humidity"
action:
- service_template: >
{% if states.sensor.bathroom_humidity.state == "high humidity"%}
switch.turn_on
{% else %}
switch.turn_off
{% endif %}
entity_id: switch.homeseer_hsws100_wall_switch_switch_7_0
- id: a_ble_beacons
alias: ibeaconupdate
initial_state: True
hide_entity: True
trigger:
- platform: mqtt
topic: owntracks/bruh/ben6p/waypoint
action:
- service: script.owntracks_update
- delay:
seconds: 15
- service: mqtt.publish
data_template:
topic: >
owntracks/bruh/{{trigger.payload_json.desc}}
payload: '{"_type":"location","tid":"{{trigger.payload_json.desc}}","acc":{{ states.device_tracker.bruh_ben6p.attributes.gps_accuracy}},"batt":80,"conn":"w","doze":false,"lat":{{ states.device_tracker.bruh_ben6p.attributes.latitude}},"lon":{{ states.device_tracker.bruh_ben6p.attributes.longitude}},"t":"r","tst":1234567890}'
- id: a_ble_beacon_test
alias: BLE Beacon Test
initial_state: False
hide_entity: False
trigger:
- platform: state
entity_id: sensor.ble_beacon_white
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: notify.ben
data_template:
title: "iBeacon Update"
message: "{{trigger.to_state.name}} has moved and is currently in the {{trigger.to_state.state}}"
- service: light.lifx_set_state
data:
entity_id: light.megadesk
brightness: 255
color_name: "red"
- delay: 00:00:01
- service: light.lifx_set_state
data:
entity_id: light.megadesk
power: off
- service: light.lifx_set_state
data:
entity_id: light.megadesk
brightness: 255
color_name: "red"
- delay: 00:00:01
- service: light.lifx_set_state
data:
entity_id: light.megadesk
power: off
- service: light.lifx_set_state
data:
entity_id: light.floor_lamp
power: off
- id: a_blind1toggle
alias: "Bilnd1 Motion"
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: sensor.blinds1_motion
from: "standby"
to: "motion"
action:
- service: light.lifx_effect_pulse
data:
entity_id:
- light.megadesk
brightness: 255
color_name: "red"
period: 1
cycles: 2
power_on: true
- service_template: >
{%- if is_state("cover.blinds1", "closed") -%}
cover.open_cover
{% else %}
cover.close_cover
{% endif %}
entity_id: cover.blinds1
- id: a_dash_bounty_toggle
alias: Dash Bounty Toggle Automation
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: input_boolean.dash_bounty_toggle
action:
- service_template: >
{% if is_state('input_boolean.dash_bounty_toggle', 'on') %}
script.dash_bounty_on
{% else %}
script.dash_bounty_off
{% endif %}
- id: a_face_detect.notinuse
alias: Face Detect
trigger:
platform: event
event_type: image_processing.detect_face
action:
- service: light.lifx_set_state
data:
entity_id:
- light.boob1
brightness: 255
color_name: "blue"
transition: 10
- id: a_home_announce
alias: "Home Announce"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: sensor.xandem
state: "motion detected"
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.presence_lockout
state: "off"
- condition: state
entity_id: input_boolean.presence_armed
state: "on"
############Only fire if Home Assistant has been up for > 5 minutes
- condition: template
value_template: "{% if as_timestamp(now()) - as_timestamp(states.input_boolean.ha_uptime.last_changed) > 301%}true{% else %}false{% endif %}"
############Only fire if it has been >5 minutes since last annoucement
- condition: template
value_template: "{% if as_timestamp(now()) - as_timestamp(states.automation.home_announce.last_updated) > 301%}true{% else %}false{% endif %}"
############Only fire if either of us have been home for < 5 minutes
- condition: or
conditions:
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and states.input_select.ben_status.state == "Home" %}true{% else %}false{% endif %}'
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300 and states.input_select.cailin_status.state == "Home" %}true{% else %}false{% endif %}'
action:
- service: tts.google_say
entity_id:
- media_player.kitchen_home
- media_player.bedroom_home
data_template:
message: >
{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300%}
Welcome home Benjamin and Kay-Lin!
{% elif as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300%}
Welcome home Benjamin!
{% elif as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300%}
Welcome home Kay-Lin!
{% else %}
This automation is confused!
{% endif %}
- service: notify.ben
data_template:
title: "Arrival"
message: >
{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300%}
Welcome home Benjamin and Cailin!
{% elif as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300%}
Welcome home Benjamin!
{% elif as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300%}
Welcome home Cailin!
{% else %}
This automation is confused!
{% endif %}
- id: a_home_day
alias: "Home Day"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.ben_status
from: "Away"
to: "Home"
- platform: state
entity_id: input_select.cailin_status
from: "Away"
to: "Home"
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.presence_lockout
state: "off"
- condition: state
entity_id: sun.sun
state: "above_horizon"
- condition: or
conditions:
###############If one of us have been home for more than 5 minutes, don't fire
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and states.input_select.cailin_status.state != "Home" %}true{% else %}false{% endif %}'
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300 and states.input_select.ben_status.state != "Home" %}true{% else %}false{% endif %}'
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300 %}true{% else %}false{% endif %}'
action:
- service: switch.turn_on
data:
entity_id:
- switch.wake_on_lan
- service: alarm_control_panel.alarm_disarm
- service: notify.ben
data_template:
title: "Home"
message: "BRUH is now set to home day"
- id: a_home_night
alias: "Home Night"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.ben_status
from: "Away"
to: "Home"
- platform: state
entity_id: input_select.cailin_status
from: "Away"
to: "Home"
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.presence_lockout
state: "off"
- condition: state
entity_id: sun.sun
state: "below_horizon"
- condition: or
conditions:
###############If one of us have been home for more than 5 minutes, don't fire
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and states.input_select.cailin_status.state != "Home" %}true{% else %}false{% endif %}'
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300 and states.input_select.ben_status.state != "Home" %}true{% else %}false{% endif %}'
- condition: template
value_template: '{% if as_timestamp(now()) - as_timestamp(states.input_select.ben_status.last_changed) < 300 and as_timestamp(now()) - as_timestamp(states.input_select.cailin_status.last_changed) < 300 %}true{% else %}false{% endif %}'
action:
- service: light.lifx_set_state
data:
entity_id:
- light.switch
- light.wall
- light.sink
- light.front_door_right
- light.front_door_left
- light.back_door
- light.floor_lamp
brightness: 255
color_temp: 200
power: on
transition: 5
- service: light.lifx_set_state
data:
entity_id:
- light.porch_strip
- light.nightstand
brightness: 125
power: on
transition: 5
- service: alarm_control_panel.alarm_disarm
- service: notify.ben
data_template:
title: "Home"
message: "BRUH is now set to home night"
- id: a_late_night
alias: "Late Night"
initial_state: True
hide_entity: False
trigger:
- platform: time
after: '22:00:00'
# condition:
# - condition: state
# entity_id: group.all_devices
# state: "home"
action:
- service: light.lifx_set_state
data:
entity_id:
- light.front_door_right
- light.front_door_left
- light.back_door
brightness: 35
color_temp: 300
power: on
transition: 30
- id: a_media_paused_night
alias: Media Paused Night
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: media_player.living_room
state: "paused"
- platform: state
entity_id: media_player.kodi
state: "paused"
condition:
- condition: state
entity_id: input_boolean.media_lockout
state: "off"
- condition: sun
after: sunset
after_offset: "-1:00:00"
action:
- service: light.lifx_set_state
data:
entity_id:
- light.sink
brightness: 50
color_temp: 196
power: on
transition: 15
- id: a_media_playing_night
alias: Media Playing Night
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: media_player.living_room
state: "playing"
- platform: state
entity_id: media_player.kodi
state: "playing"
condition:
- condition: state
entity_id: input_boolean.media_lockout
state: "off"
- condition: sun
after: sunset
after_offset: "-1:00:00"
action:
- service: light.lifx_set_state
data:
entity_id:
- light.switch
- light.sink
transition: 15
power: off
- service: light.lifx_set_state
data:
entity_id:
- light.wall
brightness: 125
color_temp: 200
power: on
transition: 15
- id: a_media_stopped_night
alias: Media Stopped Night
initial_state: True
hide_entity: True
trigger:
- platform: state
entity_id: media_player.living_room
state: "off"
- platform: state
entity_id: media_player.kodi
state: "off"
- platform: state
entity_id: media_player.kodi
state: "idle"
condition:
- condition: state
entity_id: input_boolean.media_lockout
state: "off"
- condition: sun
after: sunset
after_offset: "-1:00:00"
action:
- service: light.lifx_set_state
data:
entity_id:
- light.switch
- light.wall
- light.sink
brightness: 255
color_temp: 196
power: on
transition: 15
- id: a_minimote_1_button_1_lp
alias: Minimote 1 Button 1 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 2
action:
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
- light.boob_1
- light.boob_2
transition: 1
power: off
- id: a_minimote_1_button_1_sp
alias: Minimote 1 Button 1 Short Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 1
action:
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
- light.boob_1
- light.boob_2
brightness: 255
color_temp: 200
power: on
transition: 1
- id: a_minimote_1_button_2_lp
alias: Minimote 1 Button 2 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 4
action:
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
transition: 1
power: off
- id: a_minimote_1_button_2_sp
alias: Minimote 1 Button 2 Short Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 3
action:
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
brightness: 255
color_temp: 200
power: on
transition: 1
- id: a_minimote_1_button_3_lp
alias: Minimote 1 Button 3 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 6
action:
- service: switch.turn_off
data:
entity_id:
- switch.monitor_light
- id: a_minimote_1_button_3_sp
alias: Minimote 1 Button 3 Short Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 5
action:
- service: switch.turn_on
data:
entity_id:
- switch.monitor_light
- id: a_minimote_1_button_4_lp
alias: Minimote 1 Button 4 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 8
action:
- service: switch.turn_off
data:
entity_id:
- switch.wake_on_lan
- switch.fishstick
- switch.fan
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
- light.boob_1
- light.boob_2
transition: 1
power: off
- id: a_minimote_1_button_4_sp
alias: Minimote 1 Button 4 Short Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_33
scene_id: 7
action:
- service: switch.turn_on
data:
entity_id:
- switch.wake_on_lan
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
- light.boob_1
- light.boob_2
brightness: 255
color_temp: 200
power: on
transition: 1
- id: a_minimote_2_button_1_lp
alias: Minimote 2 Button 1 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_34
scene_id: 2
action:
- service: light.lifx_set_state
data:
entity_id:
- light.megadesk
power: off
- id: a_minimote_2_button_1_sp
alias: Minimote 2 Button 1 Short Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_34
scene_id: 1
action:
- service: light.lifx_set_state
data:
entity_id:
- light.switch
- light.wall
- light.sink
- light.front_door_right
- light.front_door_left
- light.back_door
- light.floor_lamp
brightness: 255
color_temp: 200
power: on
transition: 1
- id: a_minimote_2_button_2_lp
alias: Minimote 2 Button 2 Long Press
initial_state: True
hide_entity: True
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeotec_dsa03202_minimote_34
scene_id: 4
action: