blob: efe9950d36e5cd85682d63adbbcd49d2719be38f (
plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
|
- id: '1654820574086'
alias: 'Motions: Hall-based'
description: ''
trigger:
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 10
id: Short
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 10
seconds: 0
id: Toilet
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 40
seconds: 0
id: Long
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 20
minutes: 0
seconds: 0
id: Away
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Short
sequence:
- type: turn_off
device_id: 87071fc9d8fb9ebbccb145f5642c7404
entity_id: light.aqara_hub_m1s_426c
domain: light
- type: turn_off
device_id: 5c1c363a6825ad5a006f3bb84bb104ce
entity_id: switch.hall_lights_left
domain: switch
- type: turn_off
device_id: 07b7086cf34752386c82a5109311ac6e
entity_id: switch.entrance_lights_center
domain: switch
- conditions:
- condition: trigger
id: Toilet
sequence:
- type: turn_off
device_id: 07b7086cf34752386c82a5109311ac6e
entity_id: switch.entrance_lights_left
domain: switch
- conditions:
- condition: trigger
id: Long
sequence:
- type: turn_off
device_id: 04c6f563c006599ed7754aba652654ae
entity_id: switch.bathroom_lights_left
domain: switch
- type: turn_off
device_id: 04c6f563c006599ed7754aba652654ae
entity_id: switch.bathroom_lights_center
domain: switch
- type: turn_off
device_id: 558ce3c924f9478aad68cb5b98f05ecc
entity_id: switch.kitchen_lights_left
domain: switch
- type: turn_off
device_id: 558ce3c924f9478aad68cb5b98f05ecc
entity_id: switch.kitchen_lights_center
domain: switch
default: []
mode: single
- id: '1654901560778'
alias: 'Living: Office Light'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.living_lights_right
light: light.yeelight_color_0x7caaf86
dblclick:
- parallel:
- service: script.sleep_and_wake
data:
mode: hibernate
target: office
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_living
- id: '1654986053564'
alias: 'Hall: Kitchen LED'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.kitchen_lights_center
light: switch.kitchen_ledlights
- id: '1654986378177'
alias: 'Bedroom: Bulb'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.bedroom_lights_right
light: light.smart_light
dblclick:
- service: script.turn_off_bedroom_lights
data: {}
- type: turn_off
device_id: bf45f1d630db6e2aa1307866603f548a
entity_id: light.smart_light
domain: light
off_click:
- type: turn_off
device_id: 4ca2827c57a086e0da4d63756b15261b
entity_id: switch.bedroom_tablelamp
domain: switch
- id: '1654994043723'
alias: Aqara Sounds
description: ''
trigger:
- platform: state
entity_id:
- input_button.button_alert
- input_button.button_confirm
- input_button.button_ring
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.entity_id == ''input_button.button_confirm'' }}'
sequence:
- service: alarm_control_panel.alarm_arm_night
data: {}
target:
entity_id: alarm_control_panel.aqara_hub_m1s_426c
- conditions:
- condition: template
value_template: '{{ trigger.entity_id == ''input_button.button_ring'' }}'
sequence:
- service: alarm_control_panel.alarm_arm_home
data: {}
target:
entity_id: alarm_control_panel.aqara_hub_m1s_426c
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- conditions:
- condition: template
value_template: '{{ trigger.entity_id == ''input_button.button_alert'' }}'
sequence:
- if:
- condition: state
entity_id: input_boolean.mode_production
state: 'on'
then:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.aqara_hub_m1s_426c
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
else:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.aqara_hub_m1s_426c
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
default: []
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: alarm_control_panel.alarm_disarm
data: {}
target:
entity_id: alarm_control_panel.aqara_hub_m1s_426c
mode: single
- id: '1654996443007'
alias: 'Bedroom: BedSwitch'
description: ''
trigger:
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: single_left
discovery_id: 0x54ef4410001b175a action_single_left
id: left
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: single_right
discovery_id: 0x54ef4410001b175a action_single_right
id: right
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: double_right
discovery_id: 0x54ef4410001b175a action_double_right
id: right_dbl
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: double_left
discovery_id: 0x54ef4410001b175a action_double_left
id: left_dbl
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: hold_right
discovery_id: 0x54ef4410001b175a action_hold_right
id: right_hold
- platform: device
domain: mqtt
device_id: f7f321e14489d5f5ef9e332f06055769
type: action
subtype: hold_left
discovery_id: 0x54ef4410001b175a action_hold_left
id: left_hold
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: left
sequence:
- if:
- condition: and
conditions:
- condition: state
entity_id: switch.lights_bedroom
state: 'off'
- condition: numeric_state
entity_id: sensor.bedroom_bedsidelampsocket_power
below: '2'
then:
- parallel:
- type: turn_on
device_id: 4ca2827c57a086e0da4d63756b15261b
entity_id: switch.bedroom_tablelamp
domain: switch
else:
- parallel:
- service: script.turn_off_bedroom_lights
data: {}
- conditions:
- condition: trigger
id: left_dbl
sequence:
- parallel:
- service: switch.turn_off
target:
entity_id:
- switch.lights_living
- service: script.sleep_and_wake
data:
mode: hibernate
target: office
- if:
- condition: state
entity_id: input_boolean.mode_guests
state: 'off'
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.lights_guest
- switch.lights_temporary
- service: input_button.press
data: {}
target:
entity_id: input_button.button_confirm
- conditions:
- condition: trigger
id: left_hold
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_ring
enabled: false
- service: media_player.play_media
target:
entity_id: media_player.smartpi
data:
media_content_id: media-source://dlna_dms/asgard/:64$0$5$1$0$0
media_content_type: audio/mpeg
metadata:
title: Wish I Had An Angel
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://dlna_dms
- media_content_type: channel
media_content_id: media-source://dlna_dms/asgard/:0
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64$0
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64$0$5
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64$0$5$1
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64$0$5$1$0
- conditions:
- condition: trigger
id: right
sequence:
- service: script.bedroom_aircon
data: {}
default:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_confirm
mode: restart
- id: '1655029337428'
alias: 'Alarms: Safety'
description: ''
trigger:
- type: moist
platform: device
device_id: 62b0726b0781074264bd1ba3a69de306
entity_id: binary_sensor.bathroom_leak_water_leak
domain: binary_sensor
- platform: device
type: turned_on
device_id: d070cf57873fde4d4eeeed45e0e72f4a
entity_id: switch.hall_smoke_alarm
domain: switch
- type: unsafe
platform: device
device_id: a40e83403ac69c75db53e21c88afd53b
entity_id: binary_sensor.kitchen_gas
domain: binary_sensor
condition: []
action:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_alert
- service: notify.mobile_app_lm_g810
data:
title: SmartPI Alarm
message: Safety incidient
- service: notify.smartpi
data:
message: Safety incidient
mode: single
- id: '1655032416924'
alias: 'Alarms: Wine Notification'
description: ''
trigger:
- type: opened
platform: device
device_id: 1ac71f2a54426da15458e5b5090f7603
entity_id: binary_sensor.kitchen_door_contact
domain: binary_sensor
condition: []
action:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_ring
mode: single
- id: '1655037280868'
alias: 'Alarms: Door-knock'
description: ''
trigger:
- platform: device
domain: mqtt
device_id: 65b9dbde95854b17f5e0e31545962734
type: action
subtype: vibration
discovery_id: 0x00158d0002b310d2 action_vibration
condition:
- type: is_no_motion
condition: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
- type: is_not_open
condition: device
device_id: b45b5a514dd669f9f4bb8ebdaa396998
entity_id: binary_sensor.entrance_door_contact
domain: binary_sensor
action:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_ring
mode: single
- id: '1655084794489'
alias: Telegram
description: ''
trigger:
- platform: event
event_type: telegram_command
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "/office_light" }} '
sequence:
- type: toggle
device_id: 95931a9049849e575f2de543adf111eb
entity_id: light.yeelight_color_0x7caaf86
domain: light
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "/switch" }} '
sequence:
- if:
- condition: template
value_template: '{{ trigger.event.data.args|length == 1 }}'
- condition: template
value_template: '{{ states(trigger.event.data.args[0]) in ["on", "off",
"true", "false" ] }}'
then:
- service: notify.smartpi
data:
message: Toggling entity {{ trigger.event.data.args[0] }} from the current
state "{{ states(trigger.event.data.args[0]) }}"
- service: homeassistant.toggle
target:
entity_id: '{{ trigger.event.data.args }}'
else:
choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.args|length != 1 }}'
sequence:
- service: notify.smartpi
data:
message: 'Wrong number of arguments for /switch command: {{ trigger.event.data.args
| length }}'
- conditions:
- condition: template
value_template: '{{ states(trigger.event.data.args[0]) in ["unknown"]
}}'
sequence:
- service: notify.smartpi
data:
message: 'Unknown entity: {{ trigger.event.data.args[0] }}'
default:
- service: notify.smartpi
data:
message: 'Entity {{ trigger.event.data.args[0] }} is in unsupported
state: {{ states(trigger.event.data.args) }}'
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "/camera" }} '
sequence:
- service: telegram_bot.send_photo
data:
disable_notification: true
caption: AubergineView
url: http://smartpi:8123{{ state_attr("camera.192_168_50_51", "entity_picture")
}}
default:
- service: notify.smartpi
data:
message: 'Unsupported command: {{ trigger.event.data.command }} with params:
{{ trigger.event.data.args }}'
mode: single
- id: '1672608894803'
alias: 'Hall: Camera Switch'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.hall_lights_center
light: switch.hall_camera
- id: '1672624569107'
alias: 'Hall: Entrance Combo'
description: ''
use_blueprint:
path: lights/light_switch_combo.yaml
input:
switch: switch.entrance_lights_right
master: switch.hall_lights_left
on_click: []
off_click: []
dblclick:
- service: switch.turn_on
target:
entity_id: switch.hall_lights_right
data: {}
enabled: false
- service: script.sleep_and_wake
data:
mode: sleep
target: house
- service: input_button.press
data: {}
target:
entity_id: input_button.button_confirm
- id: '1672627582279'
alias: 'Hall: Kitchen Combo'
description: ''
use_blueprint:
path: lights/light_switch_combo.yaml
input:
switch: switch.kitchen_lights_right
master: switch.hall_lights_left
on_click: []
off_click:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.entrance_lights_center
dblclick:
- service: switch.toggle
target:
entity_id:
- switch.entrance_lights_center
data: {}
- id: '1672629824242'
alias: 'Hall: Away/Security Mode Switch'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.hall_lights_right
light: input_boolean.mode_away
delay: 0
on_click:
- service: switch.turn_on
target:
entity_id: switch.hall_lights_center
- service: input_button.press
data: {}
target:
entity_id: input_button.button_confirm
post_action: []
- id: '1672638756112'
alias: 'Alarms: Intrusion'
description: ''
use_blueprint:
path: camera/intrusion.yaml
input:
mode: input_boolean.mode_away
arm_delay: 15
disarm_delay: 5
sensors:
- binary_sensor.entrance_door_contact
- binary_sensor.hall_motions_occupancy
- switch.lights_bedroom
- switch.lights_living
camera_script:
- service: script.1672637427937
data: {}
script:
- parallel:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_alert
- service: notify.mobile_app_lm_g810
data:
title: SmartPI Alarm
message: Intrusion detected
- service: notify.smartpi
data:
message: Intrusion detected
- id: '1672677604586'
alias: 'Guestroom: Mode switch'
description: ''
use_blueprint:
path: lights/light_switch.yaml
input:
switch: switch.guestroom_lights_right
light: input_boolean.mode_guests
on_click:
- service: input_button.press
data: {}
target:
entity_id: input_button.button_confirm
- id: '1672972431474'
alias: 'Office: Knob Office Bulb Control'
description: ''
use_blueprint:
path: lights/knob-bulb-control.yaml
input:
light: light.yeelight_color_0x7caaf86
knob: sensor.office_knob_action
toggle:
- if:
- condition: device
type: is_on
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_living_lustre
- type: toggle
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
brightness: input_number.knob_office_brightness0
temperature: input_number.knob_office_temperature0
hue: input_number.knob_office_hue0
state: input_boolean.state_office_knob_pressed
- id: '1672979291802'
alias: 'Office: Knob Multi-Bulb Control'
description: ''
use_blueprint:
path: lights/knob-multi-bulb-control.yaml
input:
knob: sensor.office_knob_action
lights:
- light.yeelight_color_0x7caaf86
- light.smart_light
- id: '1672987670623'
alias: 'Office: Dimming Button'
description: ''
use_blueprint:
path: lights/light_button.yaml
input:
button: sensor.office_button_action
light: light.yeelight_color_0x7caaf86
on_click:
- service: homeassistant.turn_off
data: {}
target:
entity_id: switch.lights_living_lustre
dblclick:
- if:
- condition: state
entity_id: switch.lights_living_lustre
state: 'on'
then:
- type: turn_off
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
- service: homeassistant.toggle
data: {}
target:
entity_id: switch.lights_living_lustre
hold_delay: 500
state: input_boolean.state_office_button_pressed
hold:
- device_id: 95931a9049849e575f2de543adf111eb
domain: light
entity_id: light.yeelight_color_0x7caaf86
type: brightness_decrease
- id: '1672989606410'
alias: 'Office: Button'
description: ''
use_blueprint:
path: lights/light_button.yaml
input:
button: sensor.office_button_action
light: light.yeelight_color_0x7caaf86
on_click:
- if:
- condition: state
entity_id: switch.smart_power_strip_pro_socket_1
state: 'off'
then:
- parallel:
- service: script.sleep_and_wake
data:
mode: wake
target: office
- if:
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
below: '5'
then:
- service: script.turn_on_office_lights
data: {}
else:
- service: script.turn_on_office_lights
data: {}
dblclick:
- if:
- condition: state
entity_id: switch.lights_living_lustre
state: 'on'
then:
- type: turn_off
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
- service: homeassistant.toggle
data: {}
target:
entity_id: switch.lights_living_lustre
hold_delay: 500
hold: []
longclick:
- if:
- condition: state
entity_id: switch.smart_power_strip_pro_socket_1
state: 'off'
then:
- service: script.sleep_and_wake
data:
mode: wake
target: office
else:
- parallel:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_temporary
- if:
- condition: state
entity_id: input_boolean.mode_alone
state: 'on'
then:
- service: script.turn_off_bedroom_lights
data: {}
- if:
- condition: state
entity_id: input_boolean.mode_guests
state: 'off'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_guest
- service: input_button.press
target:
entity_id: input_button.button_confirm
data: {}
temperature: 6000
on_light: 'no'
- id: '1672991247298'
alias: 'Living: Light Sync'
description: ''
use_blueprint:
path: lights/light_sync.yaml
input:
master: switch.living_lights_left
slave: switch.living_lights_center
- id: '1672991298090'
alias: 'Bedroom: Light Sync'
description: ''
use_blueprint:
path: lights/light_sync.yaml
input:
master: switch.bedroom_lights_left
slave: switch.bedroom_lights_center
- id: '1673021522642'
alias: 'Motions: Kitchen'
description: ''
use_blueprint:
path: motion/motion_switch.yaml
input:
light_target:
- switch.kitchen_lights_left
- switch.kitchen_lights_center
motion_entity: binary_sensor.motions_kitchen
illumination_test: sensor
illuminance_entity: sensor.kitchen_motions_illuminance_lux
lux_threshold: 40
- id: '1673037015865'
alias: 'Motions: Night Light'
description: ''
use_blueprint:
path: motion/motion_switch.yaml
input:
light_target: []
motion_entity: binary_sensor.hall_motions_occupancy
illumination_test: sun
illuminance_entity: sensor.hall_motions_illuminance_lux
lux_threshold: 30
no_motion_wait: 5
on_click:
- if:
- condition: state
entity_id: input_boolean.mode_away
state: 'off'
- condition: state
entity_id: input_boolean.mode_alone
state: 'on'
- condition: state
entity_id: input_boolean.mode_bright
state: 'on'
then:
- type: turn_on
device_id: 5c1c363a6825ad5a006f3bb84bb104ce
entity_id: switch.hall_lights_left
domain: switch
else:
- type: turn_on
device_id: 87071fc9d8fb9ebbccb145f5642c7404
entity_id: light.aqara_hub_m1s_426c
domain: light
brightness_pct: 100
off_click:
- parallel:
- type: turn_off
device_id: 5c1c363a6825ad5a006f3bb84bb104ce
entity_id: switch.hall_lights_left
domain: switch
- type: turn_off
device_id: 87071fc9d8fb9ebbccb145f5642c7404
entity_id: light.aqara_hub_m1s_426c
domain: light
- id: '1673153262822'
alias: 'Motions: Global v1'
description: ''
trigger:
- platform: state
id: home
entity_id:
- group.master_phones
from: not_home
to: home
for:
hours: 0
minutes: 1
seconds: 0
- platform: state
id: away
entity_id:
- group.master_phones
from: home
to: not_home
for:
hours: 1
minutes: 0
seconds: 0
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 24
minutes: 0
seconds: 0
id: empty_day
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 120
minutes: 0
seconds: 0
id: empty_week
- type: motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 1
seconds: 0
id: motions
- platform: state
entity_id:
- input_boolean.mode_away
from: 'on'
to: 'off'
id: away_gone
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.mode_house_sleep
state: 'off'
- condition: or
conditions:
- condition: trigger
id: empty_day
- condition: and
conditions:
- condition: trigger
id: away
- condition: state
entity_id: input_boolean.mode_alone
state: 'on'
- condition: state
entity_id: binary_sensor.hall_motions_occupancy
state: 'off'
for:
hours: 2
minutes: 0
seconds: 0
sequence:
- service: script.sleep_and_wake
data:
mode: sleep
target: house
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.mode_house_sleep
- conditions:
- condition: trigger
id: empty_week
- condition: state
entity_id: input_boolean.mode_house_hibernate
state: 'off'
sequence:
- service: script.sleep_and_wake
data:
mode: hibernate
target: house
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.mode_house_hibernate
- conditions:
- condition: trigger
id: home
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.hall_lights_right
- conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.mode_house_sleep
state: 'on'
- condition: state
entity_id: input_boolean.mode_house_hibernate
state: 'on'
- condition: or
conditions:
- condition: and
conditions:
- condition: trigger
id: motions
- condition: state
entity_id: input_boolean.mode_away
state: 'off'
- condition: and
conditions:
- condition: trigger
id: away_gone
- type: is_motion
condition: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
sequence:
- if:
- condition: state
entity_id: input_boolean.mode_house_hibernate
state: 'on'
then:
- service: script.sleep_and_wake
data:
mode: wake
target: house
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.mode_house_sleep
- input_boolean.mode_house_hibernate
default: []
mode: single
- id: '1673156009695'
alias: 'Motions: Office'
description: ''
trigger:
- type: no_motion
platform: device
device_id: 6deb0a6fb7a4a849ba22afc166cf9919
entity_id: binary_sensor.hall_motions_occupancy
domain: binary_sensor
for:
hours: 2
minutes: 0
seconds: 0
id: sleep
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: sleep
- condition: state
entity_id: switch.smart_power_strip_pro_socket_1
state: 'on'
sequence:
- service: script.sleep_and_wake
data:
mode: sleep
target: office
default: []
mode: single
- id: '1673156130994'
alias: 'Hall: Kitchen Sync'
description: ''
trigger:
- platform: device
type: turned_off
device_id: 558ce3c924f9478aad68cb5b98f05ecc
entity_id: switch.kitchen_lights_left
domain: switch
condition: []
action:
- type: turn_off
device_id: 558ce3c924f9478aad68cb5b98f05ecc
entity_id: switch.kitchen_lights_center
domain: switch
mode: single
- id: '1673212686198'
alias: 'Office: Sven'
description: ''
trigger:
- platform: state
entity_id:
- switch.smart_power_strip_pro_socket_4
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 4
condition: []
action:
- service: scene.turn_on
data: {}
target:
entity_id: scene.sven_power_switch
mode: single
- id: '1673329841884'
alias: 'Motions: Toilet'
description: ''
use_blueprint:
path: motion/occupancy_tracking.yaml
input:
occupancy: input_boolean.occupancy_toilet
entrance: binary_sensor.toilet_door_contact
inside: binary_sensor.toilet_motions_occupancy
light: switch.entrance_lights_left
on_action:
- type: turn_on
device_id: 07b7086cf34752386c82a5109311ac6e
entity_id: switch.entrance_lights_left
domain: switch
reentry_wait: 10
reentry_timeout: 45
- id: '1673331563280'
alias: 'Motions: Bathroom'
description: ''
use_blueprint:
path: motion/occupancy_tracking.yaml
input:
entrance: binary_sensor.bathroom_motions_occupancy
inside: binary_sensor.bathroom_motions_occupancy
light: switch.bathroom_lights_left
occupancy: input_boolean.occupancy_bathroom
on_action:
- type: turn_on
device_id: 04c6f563c006599ed7754aba652654ae
entity_id: switch.bathroom_lights_left
domain: switch
reentry_wait: 5
reentry_timeout: 30
- id: '1674140368136'
alias: 'Office: Sven Scene Switch'
description: ''
use_blueprint:
path: media/sven_scene_switch.yaml
input:
switch_action: sensor.living_scene_switch_action
media_player: media_player.smartpi
playlist_control: input_number.smartpi_playlist
power_scene: scene.sven_power_switch
- id: '1674146213954'
alias: 'Motions: Global v2'
description: ''
use_blueprint:
path: motion/halabyan24.yaml
- id: '1674208339037'
alias: 'Office: Knob Sound-Bulb Control'
description: ''
use_blueprint:
path: lights/knob-sound-multi-bulb-control.yaml
input:
knob: sensor.office_knob_action
lights:
- light.yeelight_color_0x7caaf86
media_player: media_player.smartpi
toggle_actions:
- choose:
- conditions:
- condition: template
value_template: '{{ current_num == 0 }}'
sequence:
- if:
- condition: device
type: is_on
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_living_lustre
enabled: false
- type: toggle
device_id: 32787706a8ff87380633b7c817057935
entity_id: switch.living_tablelamp
domain: switch
default: []
|