-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
818 lines (818 loc) · 19.9 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
- id: '1636050957204'
alias: Ambiant TV light
description: ''
trigger:
- platform: state
entity_id:
- media_player.tv_ue40eh5300_2
to: 'on'
- platform: sun
event: sunset
condition:
- condition: and
conditions:
- condition: sun
after: sunset
- condition: state
state: 'on'
entity_id: media_player.tv_ue40eh5300_2
action:
- service: light.turn_on
target:
entity_id:
- light.tv_cabinet
- light.ikea_led_strip_couch
data: {}
mode: single
- id: '1636292973585'
alias: Garden lights
description: ''
trigger:
- platform: sun
event: sunset
condition:
- condition: time
before: '23:00:00'
action:
- service: switch.turn_on
target:
entity_id:
- switch.backyard_lights
mode: single
- id: '1636445923540'
alias: Away from home
description: ''
trigger:
- platform: state
entity_id: group.persons
to: not_home
condition: []
action:
- service: light.turn_off
target:
area_id:
- c9c7d949cb959b8436f04d3b8e02018a
- 5725600297af4a14beb939fde831b3e9
- e0451735c3764eebbf1c3fece20c87e9
- 940887afcb1047b2b74fad4a446ce8b9
- 4ba690e438d54e1ca7f466c0de5d960b
- hallway
entity_id:
- input_boolean.office
data: {}
- service: media_player.turn_off
data: {}
target:
entity_id:
- media_player.tv_ue40eh5300_2
- service: climate.set_preset_mode
data:
preset_mode: Manual
target:
device_id: 78450d0b88d1fdf35297da6ed09f4f8b
- service: climate.set_temperature
data:
temperature: 15
target:
entity_id: climate.nefit
- service: climate.turn_off
data: {}
target:
entity_id: climate.office
mode: single
- id: '1639577789678'
alias: 'Turn off lights when it''s getting light '
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.solar_radiation
above: '13'
condition: []
action:
- service: homeassistant.turn_off
target:
area_id:
- 5725600297af4a14beb939fde831b3e9
- c9c7d949cb959b8436f04d3b8e02018a
- 940887afcb1047b2b74fad4a446ce8b9
mode: single
- id: '1648526720153'
alias: Turn off bedside light André
description: ''
trigger:
- platform: state
entity_id: binary_sensor.sm_g991b_is_charging
to: 'off'
from: 'on'
condition:
- condition: time
after: 05:00:00
before: '10:00:00'
action:
- service: light.turn_off
target:
device_id: 68914297aa12d794b831b768627a4dc8
data: {}
mode: single
- id: '1665522807559'
alias: Livingroom lights off
description: ''
trigger:
- platform: state
entity_id:
- switch.shelly1_livingroom
from: 'on'
to: 'off'
condition:
- condition: state
state: 'off'
entity_id: media_player.tv_ue40eh5300_2
action:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id:
- light.tv_cabinet
- light.ikea_led_strip_couch
mode: single
- id: '1666373128921'
alias: Slaaptrainer Weekend
description: ''
trigger:
- platform: time
at: 07:15:00
condition:
- condition: time
weekday:
- sat
- sun
action:
- type: turn_off
device_id: 55ab137d1334f604e4eaf1080252f16d
entity_id: switch.blitzwolf_bwshp15_01
domain: switch
mode: single
- id: '1666462891423'
alias: Slaaptrainer Mo, Tu, Th, Fr
description: ''
trigger:
- platform: time
at: 06:00:00
condition:
- condition: time
weekday:
- fri
- thu
- tue
- mon
action:
- type: turn_off
device_id: 55ab137d1334f604e4eaf1080252f16d
entity_id: switch.blitzwolf_bwshp15_01
domain: switch
mode: single
- id: '1668957815753'
alias: Turn off bedside light Lize
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.phone_lize_is_charging
to: 'off'
from: 'on'
condition:
- condition: time
after: 05:00:00
before: '10:00:00'
action:
- service: light.turn_off
metadata: {}
data: {}
target:
device_id: faad4b192378e316257a2e8d2980cdcd
mode: single
- id: '1668971498514'
alias: Wake up light André
description: ''
trigger:
- platform: time
at: input_datetime.next_alarm
condition:
- condition: and
conditions:
- condition: state
entity_id: person.andre_de_zwart
state: home
- condition: state
entity_id: binary_sensor.sm_g991b_is_charging
state: 'on'
- condition: state
entity_id: light.ikea_nightlight_01
state: 'off'
action:
- service: light.turn_on
data:
brightness_pct: 1
color_temp: 500
target:
device_id: 68914297aa12d794b831b768627a4dc8
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: light.turn_on
data:
transition: 1800
brightness_pct: 100
target:
device_id: 68914297aa12d794b831b768627a4dc8
mode: single
- id: '1669754804462'
alias: Android alarm time
description: ''
trigger:
- platform: state
entity_id:
- sensor.phone_andre_next_alarm
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.phone_andre_next_alarm
state:
- unavailable
- unknown
action:
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: input_datetime.set_datetime
data_template:
datetime: '{{ as_timestamp(states(''sensor.phone_andre_next_alarm'')) | timestamp_custom(''%Y-%m-%d
%H:%M:00'') }}'
target:
entity_id: input_datetime.next_alarm
mode: single
- id: '1673262664635'
alias: Turn off hallway light after 7 min
description: ''
trigger:
- platform: state
entity_id:
- light.shelly1_hallway
to: 'on'
- platform: state
entity_id:
- binary_sensor.xiaomi_door_01_contact
to: 'on'
condition:
- condition: state
entity_id: light.shelly1_hallway
state: 'on'
action:
- delay:
hours: 0
minutes: 7
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.shelly1_hallway
mode: restart
- id: '1676100536712'
alias: Slaaptrainer aan 19:00
description: ''
trigger:
- platform: time
at: '19:00:00'
condition: []
action:
- type: turn_on
device_id: 55ab137d1334f604e4eaf1080252f16d
entity_id: switch.blitzwolf_bwshp15_01
domain: switch
mode: single
- id: '1678219014663'
alias: Arrive back home
description: ''
trigger:
- platform: state
entity_id:
- person.andre_de_zwart
to: home
- platform: state
entity_id:
- person.lize_wasmus
to: home
condition: []
action:
- service: climate.set_preset_mode
data:
preset_mode: Clock
target:
device_id: 78450d0b88d1fdf35297da6ed09f4f8b
- if:
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
below: -3
then:
- service: light.turn_on
data: {}
target:
entity_id:
- light.outdoor_light
- light.shelly1_hallway
- if:
- condition: and
conditions:
- condition: zone
entity_id: person.andre_de_zwart
zone: zone.home
- condition: state
entity_id: input_select.washing_machine
state: Finished
then:
- service: notify.mobile_app_phone_andre
data:
message: De was is klaar!
data:
tag: washing_machine
alias: If André comes home & the washing machine is finished, then send a notification
- alias: If Lize comes home & the washing machine is finished, then send a notification
if:
- condition: and
conditions:
- condition: zone
entity_id: person.lize_wasmus
zone: zone.home
- condition: state
entity_id: input_select.washing_machine
state: Finished
then:
- service: notify.mobile_app_phone_lize
data:
data: {}
mode: single
- id: '1682845588155'
alias: Washing machine - Washing
description: Set washing machine to "washing" state
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 3
seconds: 0
attribute: power
above: 5
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.washing_machine
state: 'Off'
sequence:
- service: input_select.select_option
data:
option: Washing
target:
entity_id: input_select.washing_machine
alias: State to Washing
mode: single
- id: '1682846009852'
alias: Washing machine - Finished
description: Send notification when the washing machine is done.
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 2
seconds: 0
attribute: power
below: 1
condition:
- condition: state
entity_id: input_select.washing_machine
state: Washing
action:
- service: input_select.select_option
data:
option: Finished
target:
entity_id: input_select.washing_machine
- choose:
- conditions:
- condition: state
entity_id: person.andre_de_zwart
state: home
sequence:
- service: notify.mobile_app_phone_andre
data:
message: De was is klaar!
data:
persistent: true
tag: washing_machine
alias: Notify André if home
- alias: Notify Lize if home
choose:
- conditions:
- condition: state
entity_id: person.lize_wasmus
state: home
sequence:
- service: notify.mobile_app_phone_lize
data: {}
mode: single
- id: '1683692334259'
alias: Slaaptrainer Wednesday
description: ''
trigger:
- platform: time
at: 06:15:00
condition:
- condition: time
weekday:
- wed
action:
- type: turn_off
device_id: 55ab137d1334f604e4eaf1080252f16d
entity_id: switch.blitzwolf_bwshp15_01
domain: switch
mode: single
- id: '1684871522129'
alias: Test persistent message
description: ''
trigger: []
condition: []
action:
- service: notify.mobile_app_phone_andre
data:
message: Persistent test bericht
data:
persistent: true
tag: washing_machine
mode: single
- id: '1684871753906'
alias: test persistent dismiss
description: ''
trigger: []
condition: []
action:
- service: notify.mobile_app_phone_andre
data:
message: clear_notification
data:
tag: washing_machine
mode: single
- id: '1684872146878'
alias: Washing Machine - Off
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.xiaomi_door_03_contact
to: 'on'
condition:
- condition: or
conditions:
- condition: state
entity_id: input_select.washing_machine
state: Finished
- condition: state
entity_id: input_select.washing_machine
state: Washing
action:
- service: input_select.select_option
data:
option: 'Off'
target:
entity_id: input_select.washing_machine
- service: notify.mobile_app_phone_andre
data:
message: clear_notification
data:
tag: washing_machine
- service: notify.mobile_app_sgs10_lize
data:
message: clear_notification
data:
tag: washing_machine
mode: single
- id: '1689508842876'
alias: Tablet battery low
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: '30'
- platform: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: '20'
- platform: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: '15'
- platform: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: '10'
- platform: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: '5'
condition:
- condition: state
entity_id: sensor.sgts5e_batterij_laadstatus
state: discharging
action:
- service: notify.mobile_app_phone_andre
data:
message: Tablet batterij niveau op {{states.sensor.sgts5e_batterijniveau.state_with_unit}}!
Tijd om op te laden.
data:
tag: tablet_battery_low
- service: notify.mobile_app_sgs10_lize
data:
message: Tablet batterij niveau op {{states.sensor.sgts5e_batterijniveau.state_with_unit}}!
Tijd om op te laden.
data:
tag: tablet_battery_low
mode: single
- id: '1689509348992'
alias: Tablet is charging
description: Clear notification when tablet is charging
trigger:
- platform: state
entity_id:
- binary_sensor.sgts5e_is_aan_het_opladen
from: 'off'
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.sgts5e_batterijniveau
below: 30
action:
- service: notify.mobile_app_phone_andre
data:
message: clear_notification
data:
tag: tablet_battery_low
- service: notify.mobile_app_sgs10_lize
data:
message: clear_notification
data:
tag: tablet_battery_low
mode: single
- id: '1702883926949'
alias: Christmas lights
description: ''
trigger:
- platform: state
entity_id:
- switch.shelly1_livingroom
from: 'off'
to: 'on'
- platform: state
entity_id:
- group.persons
condition: []
action:
- service: light.turn_on
target:
device_id: 44f554a69328b870c091d11e4c3f01df
data: {}
mode: single
- id: '1702923409928'
alias: Start hot water tracker
description: ''
trigger:
- platform: state
entity_id:
- sensor.status
to: '=H: hot water active'
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.shower_tracker_duration
data:
datetime: '{{ now() }}'
- service: input_text.set_value
target:
entity_id: input_text.shower_tracker_cost
data:
value: '{{ states(''sensor.gas_dsmr_cost'') }}'
- service: input_text.set_value
target:
entity_id: input_text.shower_tracker_m3
data:
value: '{{ states(''sensor.gas_dsmr'') }}'
mode: single
- id: '1703321827916'
alias: Stop hot water tracker
description: ''
trigger:
- platform: state
entity_id:
- sensor.status
from: '=H: hot water active'
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: template
value_template: '{{ trigger.from_state.last_changed < utcnow() - timedelta(minutes=3)
}}'
action:
- service: notify.telegram_andre
data_template:
message: Deze douchebeurt duurde {{ ((now() - states('input_datetime.shower_tracker_duration')|as_datetime|as_local).seconds
/ 60) | int }} minuten, heeft {{ (states('sensor.gas_dsmr')|float - states('input_text.shower_tracker_m3')|float)|round(2)
}}m3 gas gebruikt en kostte €{{ (states('sensor.gas_dsmr_cost')|float - states('input_text.shower_tracker_cost')|float)|round(2)
}}
mode: single
- id: '1703327561828'
alias: TGTG pakket beschikbaar
description: ''
trigger:
- alias: When any TGTG favorite has a package available
platform: numeric_state
entity_id:
- sensor.tgtg_bakkerij_t_stoepje_bodegraven_verrassingspakket
- sensor.tgtg_john_groente_en_meer_verrassingspakket
- sensor.tgtg_jumbo_langerak_broekvelden_bodegraven_verrassingspakket
- sensor.tgtg_supervlaai_ijs_bodegraven_verrassingspakket
- sensor.tgtg_domino_s_bodegraven_verrassingspakket
- sensor.tgtg_bakkerij_t_stoepje_bodegraven_feestdagenpakket
- sensor.tgtg_domino_s_bodegraven_duo_pizza_pakket
- sensor.tgtg_john_groente_en_meer_feestdagenpakket
- sensor.tgtg_jumbo_langerak_broekvelden_bodegraven_feestdagenpakket
- sensor.tgtg_supervlaai_ijs_bodegraven_feestdagenpakket
above: 0
condition: []
action:
- service: notify.telegram_reigeroord
data:
message: Winkel *{{ state_attr(trigger.to_state.entity_id, 'friendly_name').split('TGTG
')[1].split(' (Verrassingspakket)')[0] }}* heeft {{ states(trigger.to_state.entity_id)
}} box(en) beschikbaar van {{ state_attr(trigger.to_state.entity_id, 'original_value')
}} voor {{ state_attr(trigger.to_state.entity_id, 'item_price') }} euro. Op
te halen tussen {{ as_timestamp(state_attr(trigger.to_state.entity_id, 'pickup_start'))
| timestamp_custom("%H:%M") }} en {{ as_timestamp(state_attr(trigger.to_state.entity_id,
'pickup_end')) | timestamp_custom("%H:%M") }}. Als je interesse hebt, klik
dan hier {{ state_attr(trigger.to_state.entity_id, 'item_url') }} om deze
te kopen.
mode: single
- id: '1704723397140'
alias: Nefit unavailable notification
description: 'Sends a notification as soon as the nefit integration becomes unavailable
for 30 seconds. '
trigger:
- platform: state
entity_id:
- climate.nefit
to: unavailable
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- service: homeassistant.reload_config_entry
target:
device_id: 78450d0b88d1fdf35297da6ed09f4f8b
data: {}
enabled: false
- service: notify.mobile_app_phone_andre
data:
message: Nefit thermostat became unavailable for the last 5 minutes.
mode: single
- id: '1713119300766'
alias: Sleep Mode when phones charging
description: ''
trigger:
- platform: state
entity_id: binary_sensor.sm_g991b_is_charging
to: 'on'
- platform: state
entity_id:
- binary_sensor.phone_lize_is_charging
to: 'on'
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.sm_g991b_is_charging
state: 'on'
- condition: state
entity_id: binary_sensor.phone_lize_is_charging
state: 'on'
- condition: time
after: '20:30:00'
action:
- service: light.turn_off
target:
area_id:
- c9c7d949cb959b8436f04d3b8e02018a
- 5725600297af4a14beb939fde831b3e9
- e0451735c3764eebbf1c3fece20c87e9
- 940887afcb1047b2b74fad4a446ce8b9
- 10320c5721484f4c87ad56a96e8f441c
- 75e0dbc9fbbe436db390faa9e7ff08c7
- hallway
data: {}
- service: input_boolean.turn_off
target:
entity_id: input_boolean.office
data: {}
- service: switch.turn_off
target:
device_id: 7a3bae697ba001388e90d599cdc0b4e6
data: {}
- service: media_player.turn_off
target:
entity_id:
- media_player.tv_ue40eh5300_2
data: {}
- service: climate.set_temperature
data:
entity_id: climate.nefit
temperature: 15
- service: climate.turn_off
entity_id: climate.office
- service: cover.open_cover
target:
entity_id:
- cover.rfy_001010_2
- cover.rfy_001010_4
data: {}
mode: single
- id: '1713119338921'
alias: Turn off office heating at 22.00
description: ''
trigger:
- platform: time
at: '22:00:00'
condition: []
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.office
data: {}
mode: single
- id: '1715544844492'
alias: Turn off ambiant lights after tv ghost turn on
description: ''
trigger:
- platform: device
type: turned_off
device_id: ccea0b737a8d188b78be2d06dd0fb9c3
entity_id: 54db9111e2b20ae4312b178538a7e71f
domain: remote
condition:
- type: is_plugged_in
condition: device
device_id: 32564424fbb20cba4076ddc23df9f674
entity_id: dadcf79aaafbf8e1618bb6c2671254eb
domain: binary_sensor
- type: is_plugged_in
condition: device
device_id: e6169ab9eaa51d00fee92037864b6e64
entity_id: e80ad796235f027874eef131addae9a4
domain: binary_sensor
action:
- service: light.turn_off
metadata: {}
data: {}
target:
area_id: 5725600297af4a14beb939fde831b3e9
mode: single
- id: '1715801791714'
alias: Force ambiant light off
description: ''
trigger:
- platform: time
at: 00:05:00
condition: []
action:
- service: light.turn_off
metadata: {}
data: {}
target:
area_id: 5725600297af4a14beb939fde831b3e9
- service: light.turn_off
metadata: {}
data: {}
target:
device_id: 7853d012140ca6e3d75c8a4d8e9442a7
mode: single