-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
2530 lines (2524 loc) · 68.6 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: '1628699826699'
alias: Utility - Auto backup and upload
description: Makes a backup and uploads it to Dropbox.
trigger:
- platform: time
at: '1:00'
condition: []
action:
- service: auto_backup.backup_full
data:
keep_days: 2
name: Automated Backup {{ now().strftime('%Y-%m-%d') }}
mode: single
- id: '1628787697002'
alias: Sprinklers - Irrigation control
description: ''
trigger:
- platform: time
at: input_datetime.watering_time
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.watering_level
state: '0'
action:
- service: opensprinkler.run
data:
entity_id: binary_sensor.sprinkler_1_station_running
run_seconds: '{{states("sensor.back_watering_time") | int }}'
- delay:
hours: 0
minutes: 0
seconds: '{{states("sensor.back_watering_time") | int + 15}}'
milliseconds: 0
- service: opensprinkler.run
data:
entity_id: binary_sensor.sprinkler_2_station_running
run_seconds: '{{states("sensor.front_watering_time") | int }}'
- delay:
hours: 0
minutes: 0
seconds: '{{states("sensor.front_watering_time") | int + 15}}'
milliseconds: 0
- service: opensprinkler.run
data:
entity_id: binary_sensor.sprinkler_3_station_running
run_seconds: '{{states("sensor.lawn_watering_time") | int }}'
- delay:
hours: 0
minutes: 0
seconds: '{{states("sensor.lawn_watering_time") | int + 15}}'
milliseconds: 0
- service: switch.turn_on
data: {}
target:
entity_id: switch.voortuin_sprinkler_relais
- delay:
hours: 0
minutes: 0
seconds: '{{states("sensor.driphose_watering_time") | int + 15}}'
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.voortuin_sprinkler_relais
mode: single
- id: '1628878957372'
alias: Alarm - Trigger while armed away
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.stairs_closet_motion
- binary_sensor.downstairs_hallway_motion
- binary_sensor.livingroom_motion
- binary_sensor.upstairs_hallway_motion
- binary_sensor.kitchen_door
- binary_sensor.attic_motion
- binary_sensor.bathroom_window
- binary_sensor.bedroom_window
- binary_sensor.nursery_window
- binary_sensor.closet_window
- binary_sensor.zolder_overloop_beweging
- binary_sensor.badkamer_beweging
- binary_sensor.toilet_beweging
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
- condition: not
conditions:
- condition: device
device_id: 21772c2aaa1ef8b8657a520b4486f31f
domain: vacuum
entity_id: vacuum.noenoe
type: is_cleaning
- condition: device
device_id: bbfcd968b38b244336509a78e99c525c
domain: vacuum
entity_id: vacuum.soapie
type: is_cleaning
- condition: state
entity_id: cover.front_door_cover
state: opening
- condition: state
entity_id: cover.front_door_cover
state: closing
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
data: {}
mode: single
- id: '1629048220312'
alias: Alarm - Trigger actions
description: '- Flash lights / turn on
- Sound Alarm
- Send notification'
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: triggered
condition: []
action:
- service: scene.create
data:
scene_id: before_alarm_sound
entities: media_player.whole_home
- parallel:
- service: notify.notify
data:
message: The alarm has been triggered at {{ states('sensor.time') }}.
title: Alarm
data:
group: Alarms
tag: Alarm pending
color: red
ledColor: red
priority: high
ttl: 0
channel: alarm_stream
actions:
- action: URI
title: Disarm
uri: /lovelace/alarm
- service: script.alarm_sound_alarm
data: {}
- service: script.flash_licht
data: {}
mode: single
- id: '1629106372874'
alias: Alarm - Pending
description: ''
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: pending
condition: []
action:
- service: scene.create
data:
scene_id: before_alarm_sound
snapshot_entities: media_player.whole_home
- service: notify.notify
data:
message: The alarm was triggerd and will sound in 30 seconds.
title: Pending Alarm
data:
group: Alarms
tag: Alarm pending
color: red
ledColor: red
priority: high
timeout: 300
ttl: 0
actions:
- action: URI
title: Disarm
uri: /lovelace/alarm
- action: ALARM
title: Alarm
- service: script.alarm_sound_pending
data: {}
mode: single
- id: '1629124515237'
alias: Alarm - Play arming
description: ''
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: arming
condition: []
action:
- service: scene.create
data:
scene_id: before_alarm_sound
snapshot_entities: media_player.whole_home
- service: script.alarm_sound_arming
data: {}
mode: single
- id: '1629192620074'
alias: Alarm - Trigger from notification
description: ''
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: ALARM
condition: []
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
mode: single
- id: '1629220722760'
alias: Alarm - Auto (dis-)arming
description: (Dis-)arm the alarm when the house state changes taking into account
the early off and delay helpers.
trigger:
- platform: state
entity_id: sensor.house_state
to: home
id: HOME
- platform: state
entity_id: sensor.house_state
id: AWAY
to: away
- platform: state
entity_id: sensor.house_state
id: HOLIDAY
to: holiday
- platform: state
entity_id: sensor.house_state
id: NIGHT_ON
to: night
for: '{{ states( ''input_datetime.night_alarm_delay'' ) }}'
- platform: template
value_template: "{% set end_work = states('input_datetime.end_night_workday')
%} \n{% set end_free = states('input_datetime.end_night_free_day') %} \n\n{%
set early_hour = state_attr('input_datetime.night_alarm_early_stop', 'hour')
%} \n{% set early_min = state_attr('input_datetime.night_alarm_early_stop',
'minute') %} \n{% set early = timedelta( hours = early_hour, minutes = early_min
) %}\n\n{% set work_on = (strptime(end_work, '%H:%M:%S') - early).strftime('%H:%M')
%}\n{% set free_on = (strptime(end_free, '%H:%M:%S') - early).strftime('%H:%M')
%}\n\n{% if now().strftime('%H:%M') == work_on or now().strftime('%H:%M') ==
free_on %}\n true\n{% else %}\n false\n{% endif %}\n"
id: NIGHT_OFF
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: HOME
sequence:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
data:
code: '2070'
- conditions:
- condition: trigger
id: AWAY
sequence:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
data: {}
- conditions:
- condition: trigger
id: HOLIDAY
sequence:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
data: {}
- conditions:
- condition: trigger
id: NIGHT_ON
sequence:
- service: alarm_control_panel.alarm_arm_night
target:
entity_id: alarm_control_panel.home_alarm
data: {}
- conditions:
- condition: trigger
id: NIGHT_OFF
- condition: not
conditions:
- condition: state
entity_id: input_boolean.holiday
state: 'on'
- condition: state
entity_id: sensor.house_state
state: away
sequence:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
data:
code: '2070'
default: []
mode: single
- id: '1629220807943'
alias: Lights - All off when away
description: '- Turn of all lights when away'
trigger:
- platform: state
to: away
entity_id: sensor.house_state
condition: []
action:
- service: script.lights_turn_off_all_lights
mode: single
- id: '1629568493916'
alias: Alarm - Trigger while armed night
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.stairs_closet_motion
- binary_sensor.downstairs_hallway_motion
- binary_sensor.livingroom_motion
- binary_sensor.kitchen_door
- binary_sensor.attic_motion
- binary_sensor.zolder_overloop_beweging
- binary_sensor.toilet_beweging
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_night
- condition: not
conditions:
- condition: device
device_id: 21772c2aaa1ef8b8657a520b4486f31f
domain: vacuum
entity_id: vacuum.noenoe
type: is_cleaning
- condition: device
device_id: bbfcd968b38b244336509a78e99c525c
domain: vacuum
entity_id: vacuum.soapie
type: is_cleaning
- condition: state
entity_id: cover.front_door_cover
state: opening
- condition: state
entity_id: cover.front_door_cover
state: closing
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
data: {}
mode: single
- id: '1629825060315'
alias: Climate - Hot water service
description: ''
trigger:
- platform: template
value_template: " {% set night_start_free = state_attr('input_datetime.start_night_free_day',
'hour') * 60 + state_attr('input_datetime.start_night_free_day', 'minute')%}\n
\ {% set night_start_work = state_attr('input_datetime.start_night_workday',
'hour') * 60 + state_attr('input_datetime.start_night_workday', 'minute')%}\n
\ {% set night_end_free = state_attr('input_datetime.end_night_free_day',
'hour') * 60 + state_attr('input_datetime.end_night_free_day', 'minute')%}\n
\ {% set night_end_work = state_attr('input_datetime.end_night_workday',
'hour') * 60 + state_attr('input_datetime.end_night_workday', 'minute')%}\n
\ {% set pre_heat_offset = state_attr('input_datetime.hot_water_pre_heat',
'hour') * 60 + state_attr('input_datetime.hot_water_pre_heat', 'minute')%}\n
\ {% set stop_offset = state_attr('input_datetime.hot_water_early_stop',
'hour') * 60 + state_attr('input_datetime.hot_water_early_stop', 'minute')%}\n
\ {% set now = (states('sensor.time')[:2] | int)*60 + (states('sensor.time')[-2:]
| int)%}\n {% set house = states('sensor.house_state') %}\n\n {%
if is_state('binary_sensor.workday_sensor', 'off') %}\n {% if (night_end_free
- pre_heat_offset) < now < (night_start_free - stop_offset) %}\n {%
if house == 'away' or house == 'holiday' %}\n false\n {%else%}\n
\ true\n {%endif%}\n {%else%}\n false\n
\ {%endif%}\n {%else%}\n {% if (night_end_work - pre_heat_offset)
< now < (night_start_work - stop_offset) %}\n {% if house == 'away'
or house == 'holiday' %}\n false\n {%else%}\n true\n
\ {%endif%}\n {%else%}\n false\n {%endif%}\n
\ {%endif%}"
id: 'ON'
- platform: template
value_template: " {% set night_start_free = state_attr('input_datetime.start_night_free_day',
'hour') * 60 + state_attr('input_datetime.start_night_free_day', 'minute')%}\n
\ {% set night_start_work = state_attr('input_datetime.start_night_workday',
'hour') * 60 + state_attr('input_datetime.start_night_workday', 'minute')%}\n
\ {% set night_end_free = state_attr('input_datetime.end_night_free_day',
'hour') * 60 + state_attr('input_datetime.end_night_free_day', 'minute')%}\n
\ {% set night_end_work = state_attr('input_datetime.end_night_workday',
'hour') * 60 + state_attr('input_datetime.end_night_workday', 'minute')%}\n
\ {% set pre_heat_offset = state_attr('input_datetime.hot_water_pre_heat',
'hour') * 60 + state_attr('input_datetime.hot_water_pre_heat', 'minute')%}\n
\ {% set stop_offset = state_attr('input_datetime.hot_water_early_stop',
'hour') * 60 + state_attr('input_datetime.hot_water_early_stop', 'minute')%}\n
\ {% set now = (states('sensor.time')[:2] | int)*60 + (states('sensor.time')[-2:]
| int)%}\n {% set house = states('sensor.house_state') %}\n\n {%
if is_state('binary_sensor.workday_sensor', 'off') %}\n {% if (night_end_free
- pre_heat_offset) < now < (night_start_free - stop_offset) %}\n {%
if house == 'away' or house == 'holiday' %}\n true\n {%else%}\n
\ false\n {%endif%}\n {%else%}\n true\n
\ {%endif%}\n {%else%}\n {% if (night_end_work - pre_heat_offset)
< now < (night_start_work - stop_offset) %}\n {% if house == 'away'
or house == 'holiday' %}\n true\n {%else%}\n false\n
\ {%endif%}\n {%else%}\n true\n {%endif%}\n
\ {%endif%}"
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.hot_water_service
- service: climate.set_temperature
target:
entity_id: climate.hot_water_service
data:
temperature: '{{ states(''input_number.hot_water_temperature'') }}'
- conditions:
- condition: trigger
id: 'OFF'
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.hot_water_service
default: []
mode: queued
max: 3
- id: '1630259774998'
alias: Lights - Holiday replay
description: ''
trigger:
- platform: state
entity_id: sensor.replay_living_room
id: LIVINGROOM
- platform: state
entity_id: sensor.replay_kitchen
id: KITCHEN
- platform: state
entity_id: sensor.replay_closet
id: CLOSET
- platform: state
entity_id: sensor.replay_bedroom
id: BEDROOM
- platform: state
entity_id: sensor.replay_dining_room
id: DININGROOM
- platform: state
entity_id: input_boolean.holiday
to: 'on'
condition:
- condition: state
entity_id: input_boolean.holiday
state: 'on'
action:
- choose:
- conditions:
- condition: trigger
id: LIVINGROOM
sequence:
- choose:
- conditions:
- condition: state
entity_id: sensor.replay_living_room
state: '1'
sequence:
- service: light.turn_on
target:
entity_id: light.living_room
- conditions:
- condition: state
entity_id: sensor.replay_living_room
state: '0'
sequence:
- service: light.turn_off
target:
entity_id: light.living_room
default: []
- conditions:
- condition: trigger
id: DININGROOM
sequence:
- choose:
- conditions:
- condition: state
entity_id: sensor.replay_dining_room
state: '1'
sequence:
- service: light.turn_on
target:
entity_id: light.dining_room
- conditions:
- condition: state
entity_id: sensor.replay_dining_room
state: '0'
sequence:
- service: light.turn_off
target:
entity_id: light.dining_room
default: []
- conditions:
- condition: trigger
id: BEDROOM
sequence:
- choose:
- conditions:
- condition: state
entity_id: sensor.replay_bedroom
state: '1'
sequence:
- service: light.turn_on
target:
entity_id: light.bedroom
- conditions:
- condition: state
entity_id: sensor.replay_bedroom
state: '0'
sequence:
- service: light.turn_off
target:
entity_id: light.bedroom
default: []
- conditions:
- condition: trigger
id: CLOSET
sequence:
- choose:
- conditions:
- condition: state
entity_id: sensor.replay_closet
state: '1'
sequence:
- service: light.turn_on
target:
entity_id: light.closet
- conditions:
- condition: state
entity_id: sensor.replay_closet
state: '0'
sequence:
- service: light.turn_off
target:
entity_id: light.closet
default: []
- conditions:
- condition: trigger
id: KITCHEN
sequence:
- choose:
- conditions:
- condition: state
entity_id: sensor.replay_kitchen
state: '1'
sequence:
- service: light.turn_on
target:
entity_id: light.kitchen
- conditions:
- condition: state
entity_id: sensor.replay_closet
state: '0'
sequence:
- service: light.turn_off
target:
entity_id: light.kitchen
default: []
default: []
mode: parallel
max: 10
- id: '1630829332532'
alias: Climate - Publish central heating current temp to MQTT
description: ''
trigger:
- platform: state
entity_id:
- sensor.heating_delta
- platform: homeassistant
event: start
- platform: time_pattern
seconds: '30'
condition: []
action:
- if:
- condition: template
value_template: '{{ is_number(states(''sensor.heating_delta'')) }}'
then:
- service: mqtt.publish
data:
topic: opentherm-thermostat/current-temperature/set
payload_template: '{{state_attr(''climate.central_heating'', ''temperature'')
- states(''sensor.heating_delta'')|float}}'
mode: parallel
max: 10
- id: '1631038917696'
alias: Alarm - Link panel
description: Ensure both the software and physical alarm panel are linked.
trigger:
- platform: state
entity_id: alarm_control_panel.alarm_panel_ias_ace
id: PANEL TO HOME ALARM
- platform: state
entity_id: alarm_control_panel.home_alarm
id: HOME ALARM TO PANEL
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: PANEL TO HOME ALARM
sequence:
- choose:
- conditions:
- condition: state
entity_id: alarm_control_panel.alarm_panel_ias_ace
state: armed_night
sequence:
- service: alarm_control_panel.alarm_arm_night
target:
entity_id: alarm_control_panel.home_alarm
- conditions:
- condition: state
entity_id: alarm_control_panel.alarm_panel_ias_ace
state: armed_away
sequence:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
- conditions:
- condition: state
entity_id: alarm_control_panel.alarm_panel_ias_ace
state: triggered
sequence:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
- conditions:
- condition: state
entity_id: alarm_control_panel.alarm_panel_ias_ace
state: disarmed
sequence:
- service: alarm_control_panel.alarm_disarm
data:
code: '2070'
target:
entity_id: alarm_control_panel.home_alarm
default: []
- conditions:
- condition: trigger
id: HOME ALARM TO PANEL
sequence:
- choose:
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_night
sequence:
- service: alarm_control_panel.alarm_arm_night
target:
entity_id: alarm_control_panel.alarm_panel_ias_ace
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
sequence:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.alarm_panel_ias_ace
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: triggered
sequence:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.alarm_panel_ias_ace
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
sequence:
- service: alarm_control_panel.alarm_disarm
data:
code: '2070'
target:
entity_id: alarm_control_panel.alarm_panel_ias_ace
default: []
default: []
mode: queued
max: 3
- id: '1631473532138'
alias: Climate - Update livingroom radiator setpoint
description: Update the central heating setpoint when the climate period changes.
trigger:
- platform: state
entity_id: sensor.climate_setpoint
- platform: state
entity_id:
- climate.woonkamer_radiator_thermostat
to: heat
condition: []
action:
- if:
- condition: template
value_template: '{{ is_number(state_attr(''climate.woonkamer_radiator_thermostat'',''temperature''))
}}'
then:
- repeat:
while:
- condition: template
value_template: '{{states("sensor.climate_setpoint")|int != state_attr("climate.woonkamer_radiator_thermostat",
"temperature")|int }}'
sequence:
- service: climate.set_temperature
target:
entity_id: climate.woonkamer_radiator_thermostat
data:
temperature: '{{ states(''sensor.climate_setpoint'') | float }}'
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
mode: single
max: 3
- id: '1631815874577'
alias: Climate - Floor heating pump
description: Floor heating pump runs if there is a temp delta lager then -1 Every
night it turns to prevent the pump from stalling.
trigger:
- platform: state
entity_id: switch.floor_heating_pump_on_off
id: TIME
to: 'off'
for:
hours: 12
minutes: 0
seconds: 0
- platform: template
value_template: "{% set state = states('climate.beneden_vloerverwarming') %}\n{%
set delta = state_attr('climate.beneden_vloerverwarming', \"temperature\") -
state_attr('climate.beneden_vloerverwarming', \"current_temperature\") %}\n{%
if state == 'heat' and delta|float > -5 %}\n true\n{% else %}\n false\n{%
endif %}"
id: 'ON'
- platform: template
value_template: "{% set state = states('climate.beneden_vloerverwarming') %}\n{%
set delta = state_attr('climate.beneden_vloerverwarming', \"temperature\") -
state_attr('climate.beneden_vloerverwarming', \"current_temperature\") %}\n{%
if state == 'heat' and delta|float > -5 %}\n false\n{% else %}\n true\n{%
endif %}"
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
sequence:
- service: switch.turn_on
target:
entity_id: switch.floor_heating_pump_on_off
data: {}
- conditions:
- condition: trigger
id: 'OFF'
sequence:
- delay: '{{ states(''input_datetime.floor_heating_pump_delay'') }}'
- service: switch.turn_off
target:
entity_id: switch.floor_heating_pump_on_off
data: {}
- conditions:
- condition: trigger
id: TIME
sequence:
- service: switch.turn_on
target:
entity_id: switch.floor_heating_pump_on_off
data: {}
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
entity_id: switch.floor_heating_pump_on_off
data: {}
default: []
mode: restart
- id: '1632764660880'
alias: Utility - Notify on restart
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: script.1655204175112
data:
Title: "Opnieuw opgestart \U0001F31F"
Message: Home Assistant is opnieuw opgestart.
Url: lovelace/home
Voice: false
Admin_only: true
Timing: Always
Group: Utility
Timeout: 60
mode: single
- id: '1633712008868'
alias: Chime - Notify if pressed
description: ''
trigger:
- platform: state
entity_id: binary_sensor.doorbell_pressed
from: 'off'
to: 'on'
condition: []
action:
- service: script.1655204175112
data:
Title: "Ding dong \U0001F514"
Message: Er staat iemand aan de voordeur.
Url: lovelace/home
Voice: true
Admin_only: false
Timing: Only when home and no quiet time
Group: General
Timeout: 3
mode: single
- id: '1635185749340'
alias: Utility - Set theme
description: Ensure the preffered theme is allways used.
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: frontend.set_theme
data:
name: Mushroom Square
mode: single
- id: '1635571062556'
alias: Utility - Update quiet helper
description: 'Set quiet when house state is night.
Needed to allow manual override of the schedule.'
trigger:
- platform: state
entity_id:
- sensor.quiet_time_schedule
to: 'true'
id: QUIET
- platform: state
entity_id:
- sensor.quiet_time_schedule
id: SOUND
to: 'false'
- platform: state
entity_id:
- sensor.house_state
from: home
to: away
id: SOUND
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: QUIET
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.quiet
data: {}
- conditions:
- condition: trigger
id: SOUND
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.quiet
data: {}
default: []
mode: single
- id: '1635792969335'
alias: Lights - Reindeer follows living room
description: Have the ESPHome reindeer follow the decorations light group.
trigger:
- platform: state
entity_id:
- light.living_room
to: 'on'
id: 'ON'
- platform: state
entity_id:
- light.living_room
to: 'off'
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
sequence:
- type: turn_on
device_id: 5c76869dfc323722f7676b7a0448a090
entity_id: light.reindeer_light
domain: light
- conditions:
- condition: trigger
id: 'OFF'
sequence:
- type: turn_off
device_id: 5c76869dfc323722f7676b7a0448a090
entity_id: light.reindeer_light
domain: light
default: []
mode: single
- id: '1636210209751'
alias: Lights - Outdoor decorations
description: Turn on outdoor decorations when (close to) home and the sun is down.
trigger:
- platform: state
entity_id: sensor.outdoor_lights
to: 'on'
id: 'ON'
- platform: state
entity_id: sensor.outdoor_lights
to: 'off'
id: 'OFF'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'ON'
sequence:
- service: light.turn_on
target:
entity_id:
- light.front_garden
data: {}
- conditions:
- condition: trigger
id: 'OFF'
sequence:
- service: light.turn_off
target:
entity_id:
- light.front_garden
data: {}
default: []
mode: restart
- id: '1636297508172'
alias: Lights - Turn on lights when first down
description: Turn the downstairs lights on when the first person is downstairs.
The state is saved in an input boolean.
trigger:
- platform: state
entity_id: binary_sensor.downstairs_hallway_motion
to: 'on'
id: TRIGGER
- platform: state
entity_id:
- sensor.house_state
to: away
id: RESET
- platform: time
at: 03:30:00
id: RESET
condition:
- condition: not
conditions:
- condition: state
entity_id: cover.front_door_cover
state: opening
- condition: state
entity_id: cover.front_door_cover
state: closing
action:
- choose:
- conditions:
- condition: trigger
id: RESET
sequence: