-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
669 lines (669 loc) · 16.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
- id: licht-hal-aan-wanneer-donker-en-voordeuropen
alias: Licht hal aan wanneer zon onder en voordeur open (B2)
trigger:
- entity_id: binary_sensor.door_window_sensor_voordeur
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
condition: sun
action:
- data:
brightness: 2
entity_id: light.verlichting_hal
service: light.turn_on
- id: '1536696817398'
alias: Licht hal uit 1 minuut na het sluiten van de deur en geen beweging
trigger:
- entity_id: binary_sensor.door_window_sensor_voordeur
from: 'on'
platform: state
to: 'off'
condition:
- condition: state
entity_id: light.verlichting_hal
state: 'on'
action:
- delay: 00:01:00
- condition: state
entity_id: binary_sensor.motion_sensor_hal
state: 'off'
- alias: ''
data:
entity_id: light.verlichting_hal
service: light.turn_off
- id: '1538240319961'
alias: Verlichting kast dimmen wanneer zon onder
trigger:
- event: sunset
platform: sun
condition: []
action:
- data:
brightness: 2
entity_id: light.tradfri_slaapkamer
service: light.turn_on
- id: '1538240383674'
alias: Verlichting kast maximaal overdag
trigger:
- event: sunrise
platform: sun
condition: []
action:
- data:
brightness: 254
entity_id: light.tradfri_slaapkamer
service: light.turn_on
- id: '1540227259824'
alias: Kachel uit om 23:00
trigger:
- at: '23:00:00'
platform: time
condition: []
action:
- data:
temperature: 14
service: climate.set_temperature
- id: '1540324614249'
alias: Licht hal aan wanneer donker overdag en beweging hal (B150)
trigger:
- entity_id: binary_sensor.motion_sensor_hal
from: 'off'
platform: state
to: 'on'
condition:
- below: '10'
condition: numeric_state
entity_id: sensor.illumination_158d0002b48e7e
- before: sunset
condition: sun
action:
- data:
brightness: 150
entity_id: light.verlichting_hal
service: light.turn_on
- id: '1540395671321'
alias: Licht hal aan wanneer zon onder en beweging hal (B2)
trigger:
- entity_id: binary_sensor.motion_sensor_hal
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
condition: sun
action:
- data:
brightness: 2
entity_id: light.verlichting_hal
service: light.turn_on
- id: '1540458454993'
alias: Berta stofzuigen woensdag en vrijdag om 10:00 niemand thuis
trigger:
- at: '10:00:00'
platform: time
condition:
- condition: time
weekday:
- wed
- fri
- condition: state
entity_id: group.all_devices
state: not_home
action:
- service: vacuum.start
- id: '1540835022257'
alias: Licht hal uit wanneer geen beweging meer en deur dicht
trigger:
- entity_id: binary_sensor.motion_sensor_hal
from: 'on'
platform: state
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_voordeur
state: 'off'
action:
- alias: ''
data:
entity_id: light.verlichting_hal
service: light.turn_off
- id: '1540843281679'
alias: Notificatie wanneer wasmachine lekt
trigger:
- entity_id: binary_sensor.water_leak_sensor_wasmachine
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: Ja... en nu?
title: Wasmachine lekt!
service: notify.notify
- id: '1540843447189'
alias: Notificatie wanneer voordeur open en niemand thuis
trigger:
- entity_id: binary_sensor.door_window_sensor_voordeur
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: group.all_devices
state: not_home
action:
- data:
message: En er is niemand thuis...
title: De voordeur is open!
service: notify.notify
- id: '1541167496602'
alias: Kachel uit wanneer allebei weg voor minimaal 15 minuten
trigger:
- entity_id: group.all_devices
for: 00:15:00
from: home
platform: state
to: not_home
condition: []
action:
- data:
temperature: 14
service: climate.set_temperature
- id: '1542568575113'
alias: Licht slaapkamer aan klik switch (B2)
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_slaapkamer
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.slaapkamer
state: 'off'
action:
- data:
brightness: 2
entity_id: light.slaapkamer
service: light.turn_on
- id: '1542568632003'
alias: Licht slaapkamer uit klik switch
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_slaapkamer
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.slaapkamer
state: 'on'
action:
- data:
entity_id: light.slaapkamer
service: light.turn_off
- id: '1542629522199'
alias: Licht slaapkamer aan dubbel klik switch (B254)
trigger:
- event_data:
click_type: double
entity_id: binary_sensor.switch_slaapkamer
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
brightness: 254
entity_id: light.slaapkamer
service: light.turn_on
- data:
brightness: 254
entity_id: light.tradfri_slaapkamer
service: light.turn_on
- delay: 00:15:00
- data:
brightness: 2
entity_id: light.tradfri_slaapkamer
service: light.turn_on
- id: '1542655741962'
alias: Licht bank aan wanneer zon onder en niet thuis (B2)
trigger:
- event: sunset
platform: sun
condition:
- condition: state
entity_id: group.all_devices
state: not_home
action:
- data:
brightness: 2
entity_id: light.bank
service: light.turn_on
- id: '1542656422872'
alias: Licht bank aan wanneer we weg gaan en zon onder (B2)
trigger:
- entity_id: group.all_devices
platform: state
to: not_home
condition:
- after: sunset
condition: sun
action:
- data:
brightness: 2
entity_id: light.bank
service: light.turn_on
- id: '1542657069365'
alias: Licht bank uit om 0:00
trigger:
- at: 0:00:00
platform: time
condition: []
action:
- data:
entity_id: light.bank
service: light.turn_off
- id: '1542830579886'
alias: Notificatie wanneer achterdeur open en niemand thuis
trigger:
- entity_id: binary_sensor.door_window_sensor_achterdeur
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: group.all_devices
state: not_home
action:
- data:
message: En er is niemand thuis...
title: De achterdeur is open!
service: notify.notify
- id: '1545053194741'
alias: Notificatie wanneer wasmachine klaar
trigger:
- above: '0.5'
below: '1.5'
entity_id: sensor.wasmachine_watts
platform: numeric_state
condition:
- condition: template
value_template: "{%- if states.automation.notificatie_wanneer_wasmachine_klaar.attributes\
\ [\"last_triggered\"] -%}\n {{ (as_timestamp(now()) - as_timestamp(states.automation.notificatie_wanneer_wasmachine_klaar.attributes\
\ [\"last_triggered\"])) > 1800 }}\n{%- else -%}\n True\n{%- endif -%}\n"
action:
- data:
entity_id: media_player.keuken
message: De wasmachine is klaar, hop naar boven de droger in dus
service: tts.google_say
- id: '1545057524247'
alias: Notificatie wanneer droger klaar
trigger:
- above: '0.5'
below: '1.5'
entity_id: sensor.droger_watts
platform: numeric_state
condition:
- condition: template
value_template: "{%- if states.automation.notificatie_wanneer_droger_klaar.attributes\
\ [\"last_triggered\"] -%}\n {{ (as_timestamp(now()) - as_timestamp(states.automation.notificatie_wanneer_droger_klaar.attributes\
\ [\"last_triggered\"])) > 1800 }}\n{%- else -%}\n True\n{%- endif -%}\n"
action:
- data:
entity_id: media_player.keuken
message: De droger is klaar, hop naar boven en opvouwen maar
service: tts.google_say
- id: '1545660750751'
alias: Notificatie wanneer kachel aan en dakraam open
trigger:
- entity_id: climate.woonkamer
platform: state
to: Verwarmen
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_zolder
state: 'on'
- condition: template
value_template: "{%- if states.climate.woonkamer.attributes[\"temperature\"] -%}\n\
\ {{ states.climate.woonkamer.attributes[\"temperature\"] > 15 }}\n{%- else\
\ -%}\n True\n{%- endif -%}\n"
action:
- data:
message: En de kachel staat aan...
title: Dakraam staat nog open
service: notify.notify
- id: '1545660810235'
alias: Notificatie wanneer kachel aan en badkamer raam open
trigger:
- entity_id: climate.woonkamer
platform: state
to: Verwarmen
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_badkamer
state: 'on'
- condition: template
value_template: "{%- if states.climate.woonkamer.attributes[\"temperature\"] -%}\n\
\ {{ states.climate.woonkamer.attributes[\"temperature\"] > 15 }}\n{%- else\
\ -%}\n True\n{%- endif -%}\n"
action:
- data:
message: En de kachel staat aan...
title: Badkamer raam staat nog open
service: notify.notify
- id: '1546972884752'
alias: Thema donker wanneer zon onder
trigger:
- event: sunset
platform: sun
condition: []
action:
- data:
name: midnight
service: frontend.set_theme
- id: '1547662706132'
alias: Licht tuin uit om 0:00
trigger:
- at: 0:00:00
platform: time
condition: []
action:
- data:
entity_id: switch.tuin_verlichting
service: switch.turn_off
- data:
entity_id: switch.tuin_verlichting_2
service: switch.turn_off
- data:
entity_id: switch.voortuin
service: switch.turn_off
- data:
entity_id: switch.kerstboom
service: switch.turn_off
- id: '1547662845811'
alias: Licht tuin aan wanneer zon onder
trigger:
- event: sunset
platform: sun
condition: []
action:
- data:
entity_id: switch.voortuin
service: switch.turn_on
- data:
entity_id: switch.kerstboom
service: switch.turn_on
- data_template:
entity_id: "{% if is_state('group.all_devices', 'home') %}\n switch.tuin_verlichting\n\
{% else %}\n switch.tuin_verlichting_2\n{% endif %}\n"
service: switch.turn_on
- id: '1549893402518'
alias: Thema licht wanneer zon opkomst
trigger:
- event: sunrise
platform: sun
condition: []
action:
- data:
name: default
service: frontend.set_theme
- id: '1549894159465'
alias: Thema donker wanneer zon onder bij opstarten
trigger:
- event: start
platform: homeassistant
condition:
- after: sunset
condition: sun
action:
- data:
name: midnight
service: frontend.set_theme
- id: '1550859027603'
alias: Notificatie wanneer de deurbel gaat
trigger:
- event_data:
entity_id: binary_sensor.vibration_deurbel
movement_type: vibrate
event_type: xiaomi_aqara.movement
platform: event
condition: []
action:
- data:
entity_id: camera.voor_2
media_player: media_player.keuken
service: camera.play_stream
- data:
data:
url: zmninja://?mid=1
message: Er is aangebeld
title: Deurbel
service: notify.notify
- delay: '60'
- data:
entity_id: media_player.keuken
service: media_player.turn_off
- id: '1555260027207'
alias: Kachel uit om 2:00
trigger:
- at: 02:00:00
platform: time
condition: []
action:
- data:
temperature: 14
service: climate.set_temperature
- id: '1555441945603'
alias: Licht mancave uit klik switch
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_mancave
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.verlichting_batcave
state: 'on'
action:
- data:
entity_id: light.verlichting_batcave
service: light.turn_off
- id: '1555442176287'
alias: Licht mancave aan klik switch (B2)
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_mancave
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.verlichting_batcave
state: 'off'
action:
- data:
brightness: 2
entity_id: light.verlichting_batcave
service: light.turn_on
- id: '1555442256597'
alias: Licht mancave aan klik switch (B254)
trigger:
- event_data:
click_type: double
entity_id: binary_sensor.switch_mancave
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
brightness: 254
entity_id: light.verlichting_batcave
service: light.turn_on
- id: '1555526857177'
alias: Licht logeerkamer uit klik switch
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_logeerkamer
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.logeerkamer
state: 'on'
action:
- data:
entity_id: light.logeerkamer
service: light.turn_off
- id: '1555526929167'
alias: Licht logeerkamer aan klik switch (B2)
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.switch_logeerkamer
event_type: xiaomi_aqara.click
platform: event
condition:
- condition: state
entity_id: light.logeerkamer
state: 'off'
action:
- data:
brightness: 2
entity_id: light.logeerkamer
service: light.turn_on
- id: '1555526972117'
alias: Licht logeerkamer aan klik switch (B254)
trigger:
- event_data:
click_type: double
entity_id: binary_sensor.switch_logeerkamer
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data:
brightness: 254
entity_id: light.logeerkamer
service: light.turn_on
- id: '1563308661889'
alias: Licht overloop aan wanneer zon onder en beweging trap en hal (B2)
trigger:
- entity_id: binary_sensor.motion_sensor_trap
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
condition: sun
- condition: state
entity_id: binary_sensor.motion_sensor_hal
state: 'on'
action:
- data:
brightness: 2
entity_id: light.overloop
service: light.turn_on
- delay: 00:00:30
- data:
entity_id: light.overloop
service: light.turn_off
- id: '1566499757020'
alias: Notificatie wanneer een raam open en zon onder
trigger:
- event: sunset
platform: sun
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.door_window_sensor_logeerkamer
state: 'on'
- condition: state
entity_id: binary_sensor.door_window_sensor_slaapkamer
state: 'on'
- condition: state
entity_id: binary_sensor.door_window_sensor_zolder
state: 'on'
action:
- data:
message: En de zon is onder...
title: Er staat nog een raam open
service: notify.notify
- id: '1576177870290'
alias: Licht hal aan wanneer donker overdag en beweging trap (B150)
trigger:
- entity_id: binary_sensor.motion_sensor_trap
from: 'off'
platform: state
to: 'on'
condition:
- below: '10'
condition: numeric_state
entity_id: sensor.illumination_158d0002b48e7e
- before: sunset
condition: sun
action:
- data:
brightness: 150
entity_id: light.verlichting_hal
service: light.turn_on
- id: '1576177935871'
alias: Licht hal aan wanneer zon onder en beweging trap (B2)
trigger:
- entity_id: binary_sensor.motion_sensor_trap
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
condition: sun
action:
- data:
brightness: 2
entity_id: light.verlichting_hal
service: light.turn_on
- id: '1576326479753'
alias: Licht hal uit wanneer geen beweging meer op de trap, in de hal en deur dicht
trigger:
- entity_id: binary_sensor.motion_sensor_trap
from: 'on'
platform: state
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_voordeur
state: 'off'
- condition: state
entity_id: binary_sensor.motion_sensor_hal
state: 'off'
action:
- data:
entity_id: light.verlichting_hal
service: light.turn_off
- id: '1610828523789'
alias: Licht mancave uit wanneer film start
trigger:
- entity_id: media_player.batcave
platform: state
to: playing
condition: []
action:
- data:
entity_id: light.verlichting_batcave
service: light.turn_off
- id: '1610828785656'
alias: Licht mancave aan wanneer film pauzeert (B2)
trigger:
- entity_id: media_player.batcave
platform: state
to: paused
condition: []
action:
- data:
brightness: 2
entity_id: light.muur
service: light.turn_on