-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
3009 lines (3005 loc) · 79.8 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: Start_Up_Home_Assistant
alias: Start Up Home Assistant
trigger:
- platform: homeassistant
event: start
action:
- service: script.turn_on
entity_id: script.start_up_home_assistant
- id: '1575277594428'
alias: Set night profile for oprit camera
description: ''
trigger:
- event: sunset
platform: sun
condition: []
action:
- service: shell_command.set_oprit_profile_night
- id: '1575277627609'
alias: Set day profile for oprit camera
description: ''
trigger:
- event: sunrise
platform: sun
condition: []
action:
- service: shell_command.set_oprit_profile_day
- id: '1586931483975'
alias: 'Notify: Afval Collection'
description: ''
trigger:
- at: '18:00:00'
platform: time
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.recycleapp_tomorrow
state: papier, pmd
- condition: state
entity_id: sensor.recycleapp_tomorrow
state: restafval, gft
- condition: state
entity_id: sensor.recycleapp_tomorrow
state: groenafval
action:
- data: {}
service: script.notify_afval
mode: single
- id: '1587360682923'
alias: 'Alarm Clock: Trigger - Philippe'
description: ''
trigger:
- platform: template
value_template: '{% set alarm_time = as_timestamp(states(''sensor.pixel_5_volgende_alarm''),
none) %}
{% set time_now = as_timestamp(states(''sensor.date_time'').replace('','',''''),
none) %}
{{ alarm_time is not none and time_now >= ( alarm_time - 300) }}'
condition:
- condition: state
entity_id: person.philippe
state: home
action:
- service: light.turn_on
target:
entity_id: light.led_slaapkamer
data:
effect: solid
color_name: darkred
brightness_pct: 1
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: select.select_option
target:
entity_id: select.led_slaapkamer_preset
data:
option: Sunrise
enabled: true
mode: single
- id: Sync Tasmota states
alias: Sync Tasmota states
trigger:
- event: start
platform: homeassistant
action:
- data:
payload: ''
topic: cmnd/tasmotas/state
service: mqtt.publish
- data:
payload: ''
topic: cmnd/tasmotas/shutterposition
service: mqtt.publish
- data:
payload: ''
topic: tasmotas/cmnd/state
service: mqtt.publish
- data:
payload: 0
topic: cmnd/tasmotas/status
service: mqtt.publish
initial_state: true
- id: Alarm Clock Febe
alias: 'Alarm Clock: Trigger - Febe'
description: ''
trigger:
- platform: template
value_template: "{{ states('sensor.time') == \n (state_attr('input_datetime.febe_next_alarm',
'timestamp') - 300)\n |timestamp_custom('%H:%M', false) }}"
condition:
- condition: state
entity_id: input_boolean.febe_alarm_set
state: 'on'
action:
- service: script.sunrise_wled
data:
wled_id: febe_led_bed
time: 5
- data: {}
entity_id: input_boolean.febe_alarm_set
service: input_boolean.turn_off
mode: single
- id: '1578590308661'
alias: Led Febe Aan
description: ''
trigger:
- platform: device
domain: mqtt
device_id: c2d1c2b9c4ff7a9df90e15406fa69326
type: action
subtype: single
discovery_id: 0x00158d000290783e action_single
condition:
- condition: device
device_id: 9d61839836424735bb9de4c9ad91230a
domain: light
entity_id: light.febe_led_bed
type: is_off
action:
- entity_id: scene.default_nachttafel_febe
service: scene.turn_on
mode: single
- id: '1587626119060'
alias: Led Febe Uit
description: ''
trigger:
- platform: device
domain: mqtt
device_id: c2d1c2b9c4ff7a9df90e15406fa69326
type: action
subtype: single
discovery_id: 0x00158d000290783e action_single
condition:
- condition: device
device_id: 9d61839836424735bb9de4c9ad91230a
domain: light
entity_id: light.febe_led_bed
type: is_on
action:
- entity_id: light.febe_led_bed
service: light.turn_off
mode: single
- id: '1587624008968'
alias: Switch Febe Shaken
description: ''
trigger:
- platform: device
domain: mqtt
device_id: c2d1c2b9c4ff7a9df90e15406fa69326
type: action
subtype: shake
discovery_id: 0x00158d000290783e action_shake
condition: []
action:
- data_template:
effect: '{{ state_attr("light.febe_led_bed", "effect_list") | random }}'
entity_id: light.febe_led_bed
rgb_color:
- '{{ (range(0, 255)|random) }}'
- '{{ (range(0, 255)|random) }}'
- '{{ (range(0, 255)|random) }}'
transition: '{{ (range(1, 3)|random) }}'
entity_id: light.febe_led_bed
service: light.turn_on
mode: single
- id: '1588246366774'
alias: Aandacht Planten
description: Planten die laag gehalte van water of meststof hebben
trigger:
- at: '18:30:00'
platform: time
condition:
- condition: or
conditions:
- below: '25'
condition: numeric_state
entity_id: sensor.greenhouse_zone_1_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.greenhouse_zone_1_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.greenhouse_zone_2_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.greenhouse_zone_2_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.greenhouse_zone_3_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.greenhouse_zone_3_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.greenhouse_zone_4_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.greenhouse_zone_4_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.moestuin_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.moestuin_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.rozemarijn_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.rozemarijn_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.bloempot_voordeur_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.bloempot_voordeur_soil_conductivity
- below: '25'
condition: numeric_state
entity_id: sensor.olijfboom_moisture
- below: '100'
condition: numeric_state
entity_id: sensor.olijfboom_soil_conductivity
action:
- data_template:
message: "Deze planten vragen vandaag je aandacht: {%if states('sensor.greenhouse_zone_1_moisture')
|int (0) < 20 %}\n - Serre Zone 1 heeft water nodig, {{ states('sensor.greenhouse_zone_1_moisture')
}} %\n{%- endif %} {%- if states('sensor.greenhouse_zone_1_soil_conductivity')
|int (0) < 100 %}\n - Serre Zone 1 heeft meststof nodig, {{ states('sensor.greenhouse_zone_1_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.greenhouse_zone_2_moisture')
|int (0) < 20 %}\n - Serre Zone 2 heeft water nodig, {{ states('sensor.greenhouse_zone_2_moisture')
}} %\n{%- endif %} {%- if states('sensor.greenhouse_zone_2_soil_conductivity')
|int (0) < 100 %}\n - Serre Zone 2 heeft meststof nodig, {{ states('sensor.greenhouse_zone_2_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.greenhouse_zone_3_moisture')
|int (0) < 20 %}\n - Serre Zone 3 heeft water nodig, {{ states('sensor.greenhouse_zone_3_moisture')
}} %\n{%- endif %} {%- if states('sensor.greenhouse_zone_3_soil_conductivity')
|int (0) < 100 %}\n - Serre Zone 3 heeft meststof nodig, {{ states('sensor.greenhouse_zone_3_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.greenhouse_zone_4_moisture')
|int (0) < 20 %}\n - Serre Zone 4 heeft water nodig, {{ states('sensor.greenhouse_zone_4_moisture')
}} %\n{%- endif %} {%- if states('sensor.greenhouse_zone_4_soil_conductivity')
|int (0) < 100 %}\n - Serre Zone 4 heeft meststof nodig, {{ states('sensor.greenhouse_zone_4_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.moestuin_moisture') |int (0)
< 25 %}\n - Moestuin heeft water nodig, {{ states('sensor.moestuin_moisture')
}} %\n{%- endif %} {%- if states('sensor.moestuin_soil_conductivity') | int
< 100 %}\n - Moestuin heeft meststof nodig, {{ states('sensor.moestuin_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.rozemarijn_moisture') | int <
20 %}\n - Rozemarijn heeft water nodig, {{ states('sensor.rozemarijn_moisture')
}} %\n{%- endif %} {%- if states('sensor.rozemarijn_soil_conductivity') |int
(0) < 100 %}\n - Rozemarijn heeft meststof nodig, {{ states('sensor.rozemarijn_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.bloempot_voordeur_moisture')
|int (0) < 20 %}\n - Bloempot voordeur heeft water nodig, {{ states('sensor.bloempot_voordeur_moisture')
}} %\n{%- endif %} {%- if states('sensor.bloempot_voordeur_soil_conductivity')
|int (0) < 100 %}\n - Bloempot voordeur heeft meststof nodig, {{ states('sensor.bloempot_voordeur_soil_conductivity')
}} µS/cm\n{%- endif %} {%- if states('sensor.olijfboom_moisture') | int <
20 %}\n - Olijfboom voordeur heeft water nodig, {{ states('sensor.olijfboom_moisture')
}} %\n{%- endif %} {%- if states('sensor.olijfboom_soil_conductivity') | int
< 100 %}\n - Olijfboom voordeur heeft meststof nodig, {{ states('sensor.olijfboom_soil_conductivity')
}} µS/cm\n{%- endif %}"
service: notify.hazilverberkenstraatbot
- id: '1588439093079'
alias: 'Alarm Clock: Enable - Margot'
description: ''
trigger:
- at: '18:00:00'
platform: time
condition:
- condition: state
entity_id: binary_sensor.school_vacation
state: 'off'
- condition: state
entity_id: binary_sensor.schooldag
state: 'on'
action:
- data: {}
entity_id: input_boolean.margot_alarm_set
service: input_boolean.turn_on
- choose:
- conditions:
- condition: time
weekday:
- sun
- mon
- tue
- wed
- thu
sequence:
- service: input_datetime.set_datetime
data:
time: 07:15:00
entity_id: input_datetime.margot_next_alarm
- conditions:
- condition: time
weekday:
- fri
- sat
sequence:
- service: input_datetime.set_datetime
data:
time: 08:00:00
entity_id: input_datetime.margot_next_alarm
default: []
- id: '1588439142845'
alias: 'Alarm Clock: Enable - Febe'
description: ''
trigger:
- at: '18:00:00'
platform: time
condition:
- condition: state
entity_id: binary_sensor.school_vacation
state: 'off'
- condition: state
entity_id: binary_sensor.schooldag
state: 'on'
action:
- data: {}
entity_id: input_boolean.febe_alarm_set
service: input_boolean.turn_on
- choose:
- conditions:
- condition: time
weekday:
- sun
- mon
- tue
- wed
- thu
sequence:
- service: input_datetime.set_datetime
data:
time: 07:15:00
entity_id: input_datetime.febe_next_alarm
- conditions:
- condition: time
weekday:
- fri
- sat
sequence:
- service: input_datetime.set_datetime
data:
time: 08:00:00
entity_id: input_datetime.febe_next_alarm
default: []
mode: single
- id: '1600753998896'
alias: 'Away: automatically turn off'
description: ''
trigger:
- platform: state
entity_id: binary_sensor.no_one_home
to: 'on'
for:
minutes: 1
- platform: state
entity_id:
- binary_sensor.guest_mode
- binary_sensor.kids_home_alone
to: 'off'
for:
hours: 0
minutes: 0
seconds: 30
condition:
- condition: state
entity_id: binary_sensor.guest_mode
state: 'off'
- condition: state
entity_id: binary_sensor.kids_home_alone
state: 'off'
- condition: state
entity_id: binary_sensor.no_one_home
state: 'on'
action:
- service: script.leaving
data: {}
- id: '1600753998897'
alias: 'Away: start vacuum after 5 mins'
description: If away and guest and kids are off, enable the vacuum
trigger:
- platform: state
entity_id: binary_sensor.no_one_home
to: 'on'
for: 0:05:00
condition:
- condition: state
entity_id:
- input_boolean.guest_mode
state: 'off'
- condition: state
entity_id: binary_sensor.kids_home_alone
state: 'off'
action:
- service: script.vacuum_automated
data: {}
mode: single
- id: '1600754448159'
alias: Home
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.no_one_home
to: 'off'
from: 'on'
for:
hours: 0
minutes: 0
seconds: 5
condition: []
action:
- service: script.arriving
data: {}
mode: single
- id: '1600756948650'
alias: Woonkamer Lights Morning On
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_woonkamer
to: 'on'
condition:
- condition: and
conditions:
- condition: time
after: '6:00'
before: '9:30'
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: numeric_state
entity_id: sensor.motion_woonkamer_illuminance_lux
below: '5'
action:
- service: scene.turn_on
data:
transition: 120
target:
entity_id: scene.woonkamer_morning
mode: single
- id: '1600757546616'
alias: Woonkamer Lights Morning Off
description: ''
trigger:
- platform: template
value_template: '{{ states(''sensor.motion_woonkamer_illuminance_lux'') | float(0)>
25 and (states(''sensor.time'') >= ''06:00:00'' and states(''sensor.time'')
<= ''09:29:55'') }}'
- platform: time
at: 09:29:00
- platform: state
entity_id:
- media_player.woonkamer
to: 'off'
for:
hours: 0
minutes: 20
seconds: 0
from: 'on'
condition:
- condition: time
after: 06:00
before: 09:30
action:
- service: scene.turn_on
data:
transition: 120
target:
entity_id: scene.woonkamer_off
mode: single
- id: '1600758658063'
alias: Woonkamer Lights Eve On
description: ''
trigger:
- platform: time
at: '16:00'
- platform: state
entity_id: binary_sensor.no_one_home
to: 'off'
- platform: state
entity_id:
- sensor.motion_woonkamer_illuminance_lux
condition:
- condition: time
after: '16:00:00'
before: '19:00'
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: numeric_state
entity_id: sensor.motion_woonkamer_illuminance_lux
below: '25'
action:
- service: scene.turn_on
data:
transition: 120
target:
entity_id: scene.woonkamer_eve
mode: single
- id: '1600759062566'
alias: Woonkamer Lights Evening On
description: ''
trigger:
- platform: time
at: '19:00'
- platform: state
entity_id: binary_sensor.no_one_home
to: 'off'
- platform: template
value_template: '{{ states(''sensor.motion_woonkamer_illuminance_lux'') | float(0)<
25 and (states(''sensor.time'') >= ''19:00:00'') }}'
condition:
- condition: time
after: '19:00:00'
before: '22:00'
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: numeric_state
entity_id: sensor.motion_woonkamer_illuminance_lux
below: '25'
action:
- service: scene.turn_on
data:
transition: 120
target:
entity_id: scene.woonkamer_evening
mode: single
- id: '1600759267237'
alias: Woonkamer Lights Night
description: ''
trigger:
- platform: state
to: 'on'
entity_id: binary_sensor.motion_woonkamer
condition:
- condition: time
after: '22:00'
before: 06:00
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: media_player.tv
state: 'on'
action:
- service: scene.turn_on
data:
entity_id: scene.woonkamer_night
transition: 60
- delay: 00:04:00
- service: scene.turn_on
data:
entity_id: scene.woonkamer_off
transition: 60
mode: restart
- id: '1600759643151'
alias: Woonkamer Lights Evening Off
description: ''
trigger:
- platform: time
at: '22:00:00'
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.tv
state: 'on'
sequence:
- wait_for_trigger:
platform: state
entity_id: media_player.tv
for:
minutes: 5
to: 'off'
default: []
- service: scene.turn_on
data:
transition: 120
target:
entity_id: scene.woonkamer_off
mode: restart
- id: '1600846307260'
alias: Reset Daily Inputs
description: ''
trigger:
- platform: time
at: 00:00:00
condition: []
action:
- service: input_boolean.turn_off
entity_id: input_boolean.daily_vacuum_first_run
mode: single
- id: '1600848151975'
alias: 'Telegram: Vacuum Response'
description: ''
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /vacuumemptybindone
- platform: event
event_type: telegram_callback
event_data:
command: /vacuumemptybinextend
condition: []
action:
- service: script.vacuum_bin_feedback
data:
callback_id: '{{ trigger.event.data.id }}'
command: '{{ trigger.event.data[''command''].strip(''/'') }}'
mode: single
- id: '1600848151075'
alias: 'Set Mode: Telegram Response'
description: ''
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /yesguest
- platform: event
event_type: telegram_callback
event_data:
command: /noguest
- platform: event
event_type: telegram_callback
event_data:
command: /yeskidshomealone
condition: []
action:
- service: script.guest_mode_feedback
data:
callback_id: '{{ trigger.event.data.id }}'
command: '{{ trigger.event.data[''command''].strip(''/'') }}'
mode: single
- id: '1600850581196'
alias: 'Vacuum: Select Room'
description: ''
trigger:
- platform: state
entity_id: input_select.vacuum_room
from: Selecteer Kamer
condition: []
action:
- service: script.vacuum_zone
data:
zone: '{{ states(''input_select.vacuum_room'') }}'
mode: single
- id: '1600861348101'
alias: 'Security: motion detected indoor but we are not home'
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.motion_gang_eerste_2
- binary_sensor.motion_gang_eerste_1
- binary_sensor.motion_inkom_1
- binary_sensor.motion_inkom_2
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.no_one_home
state: 'on'
- condition: state
entity_id: vacuum.dalek
state: docked
- condition: state
entity_id: binary_sensor.guest_mode
state: 'off'
- condition: state
entity_id: binary_sensor.kids_home_alone
state: 'off'
action:
- service: script.motion_detected
data:
sensor: '{{ trigger.entity_id }}'
mode: single
- id: '1600870113700'
alias: 'Set Mode: Guest - Activate/Deactivate'
description: ''
trigger:
- platform: state
entity_id: input_boolean.guest_mode
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
sequence:
- service: script.activate_guest_mode
data: {}
- conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- service: script.deactivate_guest_mode
data: {}
default: []
mode: single
- id: '1600870370709'
alias: Set Timed Temperature Based on Input
description: ''
trigger:
- platform: time
at: input_datetime.temperaturetime
condition:
- condition: state
entity_id: input_boolean.tempsetactive
state: 'on'
action:
- service: script.set_temperature
data: {}
mode: single
- id: '1600927539284'
alias: 'Set Mode: Night - Activate'
description: ''
trigger:
- platform: time
at: input_datetime.night_mode_start
- platform: state
entity_id: binary_sensor.no_one_home
to: 'off'
for: 00:01:00
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: time
after: input_datetime.night_mode_start
before: input_datetime.night_mode_weekday_end
action:
- service: script.activate_night_mode
data: {}
mode: single
- id: '1600927587299'
alias: 'Set Mode: Night - Deactivate Weekday'
description: ''
trigger:
- platform: time
at: input_datetime.night_mode_weekday_end
- platform: homeassistant
event: start
condition:
- condition: time
after: input_datetime.night_mode_weekday_end
before: input_datetime.night_mode_start
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: binary_sensor.school_vacation
state: 'off'
action:
- service: script.deactivate_night_mode
data: {}
mode: single
- id: '1600928587299'
alias: 'Notify: Bureau Led Door Opened'
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.voordeur
- binary_sensor.keukendeur
- binary_sensor.achterdeur
- binary_sensor.garagedeur
- binary_sensor.garagepoort_input
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.motion_detected_bureau_in_last_hour
state: 'on'
action:
- service: scene.create
data:
scene_id: notify_led_bureau
snapshot_entities: light.desk_lamp
- variables:
effect: '{{ state_attr(''light.desk_lamp'', ''effect'')}}'
notify_effect: Police
- if:
- condition: template
value_template: '{{ trigger.entity_id == "binary_sensor.garagepoort_input" }}'
then:
- variables:
notify_effect: Glitter
- service: light.turn_on
data:
brightness_pct: 100
effect: '{{ notify_effect }}'
target:
entity_id: light.desk_lamp
- delay: 00:01:00
- service: light.turn_off
target:
entity_id: light.desk_lamp
data: {}
- scene: scene.notify_led_bureau
mode: single
- id: '1600928588299'
alias: 'Set Mode: Night - Toggle'
description: ''
trigger:
- platform: state
entity_id: binary_sensor.night_mode
for:
minutes: 1
condition: []
action:
- service: script.night_mode_turn_{{ trigger.to_state.state }}
- id: '1601324314469'
alias: 'Set Mode: Night - Deactivate Weekend'
description: ''
trigger:
- platform: time
at: input_datetime.night_mode_weekend_end
- platform: state
entity_id: binary_sensor.no_one_home
to: 'off'
for: 00:01:00
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: binary_sensor.no_one_home
state: 'off'
- condition: time
after: input_datetime.night_mode_weekend_end
before: input_datetime.night_mode_start
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
action:
- service: script.deactivate_night_mode
data: {}
mode: single
- id: '1602156764240'
alias: Radio Beneden
description: Radio aansteken, 's morgens (beweging), door de dag op presence
trigger:
- platform: state
entity_id: binary_sensor.motion_woonkamer
to: 'on'
- platform: state
entity_id: binary_sensor.no_one_home
to: 'off'
condition:
- condition: and
conditions:
- condition: time
after: '6:00'
before: '18:00'
- condition: state
entity_id: media_player.beneden
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: media_player.tv
state: 'on'
action:
- service: script.radio_beneden
data: {}
mode: single
- id: '1602686644196'
alias: 'Vacuum: Started Cleaning'
description: ''
trigger:
- platform: state
entity_id: vacuum.dalek
to: cleaning
condition:
- condition: state
entity_id: input_select.vacuum_room
state: Selecteer Kamer
action:
- service: script.vacuum_record_run
data: {}
- service: script.vacuum_notify
data: {}
mode: single
- id: '1603348403144'
alias: Cabinet Fan Control
description: Controls the fan speed depending on the temperature
trigger:
- platform: state
entity_id: sensor.temperature_bureau
- platform: state
entity_id:
- button.copperhead_shutdown
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.temperature_bureau
below: '21'
sequence:
- service: fan.turn_off
data:
entity_id:
- fan.cabinet_fan_1
- fan.cabinet_fan_2
- conditions:
- condition: state
entity_id: button.copperhead_shutdown
state: unavailable
sequence:
- service: fan.turn_off
data:
entity_id:
- fan.cabinet_fan_1
- fan.cabinet_fan_2
default:
- condition: state
entity_id: device_tracker.copperhead
state: not_home
- service: fan.turn_on
data_template:
entity_id:
- fan.cabinet_fan_1
- fan.cabinet_fan_2
percentage: 100
- alias: Wait 5s
delay: 5
- service: fan.turn_on
data_template:
entity_id:
- fan.cabinet_fan_1
- fan.cabinet_fan_2
percentage: "{% if states('sensor.temperature_bureau') | int(0) > 28 %}\n
\ 100\n{% elif states('sensor.temperature_bureau') | int(0) > 25 %}\n 50\n{%
elif states('sensor.temperature_bureau') | int(0) >= 21 %}\n 25\n{% else
%}\n 10\n{% endif %}\n"
mode: single
- id: '1604346606992'
alias: 'Security: MotionEye - Oprit'
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.oprit_cctv_motion
to: 'on'
action:
- service: input_number.set_value
entity_id: input_number.oprit_last_cctv_motion_event
data_template:
value: '{{ state_attr(''binary_sensor.oprit_cctv_motion'',''eventnumber'') }}'
- service: input_datetime.set_datetime
entity_id: input_datetime.oprit_last_cctv_motion
data_template:
date: '{{ state_attr(''binary_sensor.oprit_cctv_motion'',''timestamp'').split(''
'')[0] }}'
time: '{{ state_attr(''binary_sensor.oprit_cctv_motion'',''timestamp'').split(''
'')[1].replace(''-'','':'') }}'
- repeat:
sequence:
- service: image_processing.scan
entity_id: image_processing.doods_oprit
- wait_for_trigger:
- platform: state