-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
3800 lines (3799 loc) · 106 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: '1618070798660'
alias: Battery - Low battery level detection & notification for all battery sensors
description: Low battery level detection & notification for all battery sensors
use_blueprint:
path: sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
input:
time: '10:00:00'
actions:
- action: notify.mobile_app_iphone_rob
data:
message: "\U0001F50B Low battery warning for {{sensors|replace(\"_\",\"
\")}}"
data:
persistent: true
tag: persistent
- id: alarm_auto_arm_when_away
alias: Alarm - Auto arm since we're away and all is closed
description: We didn't enable the Guest mode and we both left, arm the house
trigger:
- platform: numeric_state
entity_id: zone.home
for:
hours: 0
minutes: 3
seconds: 0
below: '1'
condition:
- condition: and
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: disarmed
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- data:
message: ⏰ We zijn beiden weg, het alarm wordt geactiveerd
data:
persistent: true
tag: persistent
action: notify.all_phones
- target:
entity_id: alarm_control_panel.alarmo
data: {}
action: alarm_control_panel.alarm_arm_away
mode: single
- id: alarm_auto_disarm_when_arriving
alias: Alarm - Disarm automatically when one of us comes home
description: Automatically disarm when we come home
triggers:
- entity_id:
- person.rob
- person.steffi
to: home
for: 0:00:30
trigger: state
- entity_id: device_tracker.ix3
to: home
from: not_home
trigger: state
conditions:
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_home
- condition: state
entity_id: alarm_control_panel.alarmo
state: pending
- condition: state
entity_id: alarm_control_panel.alarmo
state: triggered
- condition: state
entity_id: alarm_control_panel.alarmo
state: arming
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
actions:
- action: notify.all_phones
data:
message: ⏰ Een van ons komt thuis, het alarm wordt gedeactiveerd.
data:
persistent: true
tag: persistent
- action: alarm_control_panel.alarm_disarm
data:
code: automation
target:
entity_id: alarm_control_panel.alarmo
mode: single
- id: alarm_trigger_when_armed_away
alias: Alarm - Trigger when door and window status change
description: Change the alarm state to triggering when an important door or window
opens
trigger:
- platform: state
entity_id: sensor.doors_windows_open_count
condition:
- condition: template
value_template: '{{ trigger.to_state.state | int > trigger.from_state.state |
int }}'
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away,armed_home,armed_night
action:
- action: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.alarmo
mode: single
- id: alarm_triggered_alert
alias: Alarm - Triggered BEEP BEEP BEEP
description: Now we are in trouble, the alarm is triggered and we have not disarmed
it. A lot of noise and lights will be activated.
trigger:
- platform: state
entity_id: alarm_control_panel.alarmo
to: triggered
action:
- action: notify.all_phones
data:
message: "\U0001F6A8\U0001F6A8 ALARM! Het alarm gaat af en is te laat gedeactiveerd!
\U0001F6A8\U0001F6A8"
data:
persistent: true
tag: persistent
push:
sound: alarm.caf
critical: 1
volume: 1
interruption-level: critical
actions:
- action: URI
title: Bekijk cams
uri: /lovelace/4
- action: SILENCE_ALARM
title: Alarm uit
icon: sfsymbols:bell.slash
- action: input_boolean.turn_on
target:
entity_id: input_boolean.alarm_active
- repeat:
while:
- condition: state
entity_id: alarm_control_panel.alarmo
state: triggered
- condition: template
value_template: '{{ repeat.index <= 20 }}'
sequence:
- data:
sonos_entity: media_player.eetkamer
volume: 30
message: Je bent gezien en wordt nu gefilmd!
action: script.sonos_say
- action: script.sonos_play_sound
data:
mp3_url: https://home.tigrou.nl/local/sounds/alarm2.mp3
volume: 40
sonos_entity: media_player.living_room
- action: input_boolean.turn_off
target:
entity_id: input_boolean.alarm_active
mode: single
- id: alarm_pending_trigger
alias: Alarm - Pending
description: Warn the person that walked in about the armed alarm, goal is to disarm
asap
trigger:
- platform: state
entity_id: alarm_control_panel.alarmo
to: pending
action:
- data:
sonos_entity: media_player.eetkamer
volume: 20
message: Je bent gezien, deactiveer het alarm binnen 2 minuten!
action: script.sonos_say
- data:
title: Alarm actief
content:
type: custom:alarmo-card
entity: alarm_control_panel.alarmo
action: browser_mod.popup
- repeat:
while:
- condition: state
entity_id: alarm_control_panel.alarmo
state: pending
- condition: template
value_template: '{{ repeat.index <= 10 }}'
sequence:
- data:
mp3_url: https://home.tigrou.nl/local/sounds/pending_alarm.mp3
volume: 40
sonos_entity: media_player.living_room
action: script.sonos_play_sound
- id: alarm_disarm_correctly
alias: Alarm - Disarmed
description: Send a message that the alarm is properly disarmed and inform the person
over speakers
trigger:
- platform: state
entity_id: alarm_control_panel.alarmo
from: triggered,pending
to: disarmed
action:
- action: notify.all_phones
data:
message: '✅ ALARM: Het alarm is uitgezet.'
data:
persistent: true
tag: persistent
- action: script.sonos_say
data:
sonos_entity: media_player.eetkamer
volume: 20
message: Het alarm is uitgeschakeld
mode: single
- id: reset_lights_automation
alias: Lights - Reset lights automation
description: When we have disabled all automatic lighting, we reset this in the
early morning to make sure we're back to normal the next day
trigger:
- platform: time
at: 05:00:00
condition:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.enable_automatic_lights
state: 'off'
- condition: state
entity_id: input_boolean.enable_automatic_garden_lights
state: 'off'
- condition: state
entity_id: input_boolean.enable_automatic_screens
state: 'off'
action:
- action: input_boolean.turn_on
entity_id: input_boolean.enable_automatic_lights
- action: input_boolean.turn_on
entity_id: input_boolean.enable_automatic_garden_lights
- id: groundfloor_lights_on_when_dark_away
alias: Lights - Turn on lights when dark - away
description: Switch standard lights on when it's after 2 PM and light level too
low
trigger:
- platform: numeric_state
entity_id: sensor.light_sensor_living_illuminance_lux
below: '30'
condition:
- condition: and
conditions:
- condition: state
entity_id: light.socket2_light_couch
state: 'off'
- condition: time
after: '14:00'
before: '22:30'
- condition: state
entity_id: input_boolean.enable_automatic_lights
state: 'on'
- condition: state
entity_id: zone.home
state: '0'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- action: notify.mobile_app_iphone_rob
data:
message: "\U0001F4A1 Verlichting automatisch aan - niet thuis"
data:
persistent: true
tag: persistent
- action: script.lights_on_away
data: {}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
mode: single
- id: groundfloor_lights_on_when_dark_home
alias: Lights - Turn on lights when dark - home
description: Switch standard lights on when it's after 2 PM and light level too
low
trigger:
- platform: numeric_state
entity_id:
- sensor.light_sensor_living_illuminance_lux
below: '30'
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition:
- condition: and
conditions:
- condition: time
after: '10:00'
before: '22:30'
- condition: state
entity_id: input_boolean.enable_automatic_lights
state: 'on'
- condition: state
entity_id: binary_sensor.template_people_home_and_awake
state: 'on'
- condition: device
device_id: 29fa064f108236608f9f0d8f063dbc17
domain: alarm_control_panel
entity_id: alarm_control_panel.alarmo
type: is_disarmed
action:
- action: script.lights_on_home
data: {}
- delay: '1'
mode: single
- id: backup_snapshots_stale
alias: Backup - Snapshots went stale
description: Send a push message when the backups are failing
trigger:
- platform: state
entity_id: binary_sensor.snapshots_stale
from: 'False'
to: 'True'
condition: []
action:
- action: notify.mobile_app_iphone_rob
data:
title: "\U0001F6A8\U0001F6A8 Snapshots are Stale \U0001F6A8\U0001F6A8"
message: Please visit the Hass.io Google Drive Backup add-on status page for
details.
data:
persistent: true
tag: persistent
- id: calendar_trash_alert
alias: Calendar - Afval Calendar Alert
description: Send messages when a trash bin should be put outside
trigger:
- entity_id: sensor.template_gft_days_until_collection
platform: state
to: '1'
for:
hours: 20
minutes: 0
seconds: 0
- entity_id: sensor.template_rest_days_until_collection
platform: state
to: '1'
for:
hours: 20
minutes: 0
seconds: 0
- entity_id: sensor.template_paper_days_until_collection
platform: state
to: '0'
for:
hours: 16
minutes: 0
seconds: 0
action:
- action: notify.all_phones
data_template:
message: "\U0001F4C5 Opletten {{ state_attr(trigger.entity_id, 'friendly_name')
}}!"
data:
persistent: true
tag: persistent
- id: doorbell_ring_notification
alias: Doorbell - Notification Doorbell Ring
description: Say ding dong through the speakers when doorbell rings
trigger:
- platform: state
entity_id:
- binary_sensor.langeweide_doorbell_visitor
from: 'off'
to: 'on'
action:
- parallel:
- action: script.sonos_play_sound
data:
volume: 30
sonos_entity: media_player.eetkamer
mp3_url: https://home.tigrou.nl/local/sounds/doorbell2.mp3
- action: script.sonos_play_sound
data:
volume: 30
sonos_entity: media_player.woonkamer
mp3_url: https://home.tigrou.nl/local/sounds/doorbell2.mp3
- condition: time
after: 06:00:00
before: '22:00:00'
- action: script.sonos_play_sound
data:
volume: 20
sonos_entity: media_player.slaapkamer_sonos
mp3_url: https://home.tigrou.nl/local/sounds/doorbell2.mp3
- id: garden_lights_turn_on
alias: Garden - Turn on garden lights
description: When it's getting dark and at least after 4 PM, turn on lights in the
garden
trigger:
- platform: numeric_state
entity_id:
- sensor.light_sensor_garden_illuminance_lux
below: 8
- platform: time
at: 07:00
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: '-3'
condition:
- condition: or
conditions:
- condition: and
conditions:
- condition: time
after: '16:00'
- condition: time
before: '22:55'
- condition: state
entity_id: input_boolean.enable_automatic_garden_lights
state: 'on'
- condition: state
entity_id: light.hue_lily_light_fence_1
state: 'off'
- alias: In the morning it should be dark enough and not just turned off by the
other automation
condition: and
conditions:
- condition: time
after: 06:15
- condition: time
before: 08:55
- condition: state
entity_id: input_boolean.enable_automatic_garden_lights
state: 'on'
- condition: state
entity_id: light.hue_lily_light_fence_1
state: 'off'
- condition: state
entity_id: light.garden_lantern_light1
state: 'on'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.light_sensor_living_illuminance_lux
below: 8
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
below: '-4'
- condition: state
entity_id: light.hue_lily_light_fence_1
state: 'off'
for:
hours: 0
minutes: 15
seconds: 0
action:
- action: light.turn_on
data:
brightness_pct: 50
target:
entity_id:
- light.garden_light
- action: light.turn_on
data:
kelvin: 2200
target:
entity_id:
- light.palm1_light
- light.palm2_light
- action: light.turn_on
data:
brightness_pct: 6
target:
entity_id: light.woodshed_light
- action: light.turn_on
data:
brightness_pct: 50
target:
entity_id: light.garden_lantern_light1
- action: light.turn_on
data:
brightness_pct: 50
target:
entity_id: light.garden_lantern_light2
- action: light.turn_on
data:
brightness_pct: 50
target:
entity_id: light.garden_lantern_light3
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- action: light.turn_on
data:
brightness_pct: 35
target:
entity_id: light.veranda_light
- action: light.turn_on
data:
kelvin: 2200
target:
entity_id: light.hue_lights_garden
mode: single
- id: garden_lights_turn_off
alias: Garden - Turn off garden lights - morning
description: Turn off lights in the garden in the morning
trigger:
- platform: time
at: 09:00
- platform: numeric_state
entity_id:
- sensor.light_sensor_garden_illuminance_lux
above: 5
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition:
- condition: state
entity_id: input_boolean.enable_automatic_garden_lights
state: 'on'
action:
- action: light.turn_off
data: {}
target:
entity_id:
- light.veranda_light
- light.hue_lights_garden
- light.woodshed_light
- light.palm1_light
- light.palm2_light
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: light.turn_off
data: {}
target:
entity_id:
- light.garden_lantern_light1
- light.garden_lantern_light2
- light.garden_lantern_light3
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: light.turn_off
data: {}
target:
entity_id:
- light.garden_light
mode: single
- id: lights_turn_off_bedtime_manual
alias: Sleep - Switch to night mode manually
description: Go to bed switch, turn off all we don't need during the night. Lights,
music, tv, etc. And turn on the alarm
trigger:
- platform: state
entity_id:
- alarm_control_panel.alarmo
from: disarmed
to: armed_night
condition:
- condition: or
conditions:
- condition: time
after: '21:00:00'
- condition: time
before: 05:00
action:
- parallel:
- action: script.sleep_well
data: {}
- sequence:
- action: light.turn_on
data:
brightness_pct: 30
target:
entity_id: light.dimmer_hall
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- action: light.turn_off
target:
entity_id: light.dimmer_hall
alias: Turn on hall light shortly
- alias: Turn off the couch and corner light too if it's after 11 pm
condition: time
after: '22:55:00'
- action: light.turn_off
target:
entity_id:
- light.socket1_light_corner
- light.socket2_light_couch
data: {}
mode: single
- id: lights_turn_off_bedtime_auto
alias: Lights - Turn off lights automatically - bedtime
description: Turn off main lights when we're not home or already went to bed
trigger:
- platform: time_pattern
minutes: /1
condition:
- condition: and
conditions:
- condition: state
entity_id: light.socket2_light_couch
state: 'on'
- condition: time
after: '23:03'
- condition: state
entity_id: input_boolean.enable_automatic_lights
state: 'on'
- condition: state
entity_id: zone.home
state: '0'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- action: notify.mobile_app_iphone_rob
data:
message: "\U0001F4A1 Verlichting automatisch uit"
data:
persistent: true
tag: persistent
- action: script.sleep_well
data: {}
- action: light.turn_off
target:
entity_id:
- light.socket1_light_corner
- light.socket2_light_couch
mode: single
- id: closet_light_turn_on
alias: Lights - Turn on lights when closet door opens
trigger:
- platform: state
entity_id: binary_sensor.door_hallcloset_openclose_contact
from: 'off'
to: 'on'
action:
- action: light.turn_on
data: {}
target:
entity_id: light.hallcloset_light
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.door_hallcloset_openclose_contact
from: 'on'
to: 'off'
- action: light.turn_off
data: {}
target:
entity_id: light.hallcloset_light
- id: lights_kitchen_turn_on_when_awake_morning
alias: Lights - Turn on lights when hallway door opens in the early morning
trigger:
- platform: state
entity_id: binary_sensor.hallwaydoor_openclose_contact
from: 'off'
to: 'on'
condition:
- condition: time
after: 04:00
before: '11:00:00'
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_night
for:
hours: 0
minutes: 10
seconds: 0
action:
- action: alarm_control_panel.alarm_disarm
data:
code: automation
target:
entity_id: alarm_control_panel.alarmo
- choose:
- conditions:
- condition: time
after: 06:00
- condition: numeric_state
entity_id: zone.home
above: '0'
sequence:
- action: media_player.media_play
data: {}
target:
entity_id: media_player.eetkamer
- condition: numeric_state
entity_id: sensor.light_sensor_living_illuminance_lux
below: '60'
- action: light.turn_on
data:
brightness_pct: 40
target:
entity_id:
- light.kitchendesk_light
- light.diningtable_light
mode: single
- id: restart_ssh_addon
alias: Hass - Restart SSH Addon
description: Restart the ssh addon after a HA restart, required to get the hassio.addon_stdin
to work
trigger:
- platform: homeassistant
event: start
- platform: time
at: 01:00:00
action:
- delay: 00:04
- action: hassio.addon_restart
data:
addon: a0d7b954_ssh
- delay: 00:01
- action: hassio.addon_stdin
data:
addon: a0d7b954_ssh
input: bash /config/cast.sh
mode: single
- alias: System - Let's Encrypt Renewal
id: system_lets_encrypt
description: Restart the lets encrypt addon, this should renew the certificate
trigger:
platform: time
at: 01:15:00
action:
- action: hassio.addon_restart
data:
addon: core_letsencrypt
- alias: Lights - Check if automatic lights are disabled by accident
id: lights_reset_disabled_accidentally
description: Check every hour if this wasn't done by accident
trigger:
platform: time_pattern
hours: /1
condition:
condition: and
conditions:
- condition: time
after: 05:30:00
before: '20:30:00'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.enable_automatic_lights
state: 'off'
- condition: state
entity_id: input_boolean.enable_automatic_garden_lights
state: 'off'
action:
action: notify.mobile_app_iphone_rob
data:
message: De automatische verlichting is uitgeschakeld, dit is mogelijk onbewust.
data:
persistent: true
tag: persistent
actions:
- action: URI
title: Open Hass
uri: /lovelace/0
- id: presence_detection_message_speakers
alias: Presence - Inform that one of us comes home
description: Shout through speakers that somebody is arriving when the other one
is home
trigger:
- platform: state
for:
seconds: 15
entity_id:
- person.rob
- person.steffi
to: home
condition:
- condition: or
conditions:
- condition: state
entity_id: person.rob
state: home
- condition: state
entity_id: person.steffi
state: home
- condition: state
state: 'off'
entity_id: input_boolean.guest_mode
action:
- action: script.sonos_say
data_template:
sonos_entity: media_player.eetkamer
volume: 30
message: Wakker worden, {{ state_attr(trigger.entity_id, 'friendly_name') }}
komt er aan!
- delay: '2'
mode: single
- id: presence_frigate_object_detection
alias: Alarm - Notify of person events on camera
trigger:
- platform: mqtt
topic: frigate/events
condition:
- condition: or
conditions:
- condition: device
device_id: 29fa064f108236608f9f0d8f063dbc17
domain: alarm_control_panel
entity_id: alarm_control_panel.alarmo
type: is_armed_night
- condition: device
device_id: 29fa064f108236608f9f0d8f063dbc17
domain: alarm_control_panel
entity_id: alarm_control_panel.alarmo
type: is_armed_away
- condition: template
value_template: '{{ trigger.payload_json[''after''][''label''] == ''person'' }}'
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(states.automation.presence_notify_of_events_in_frigate.attributes.last_triggered,
0) | int > 120 }}'
- condition: or
conditions:
- condition: template
value_template: '{{ trigger.payload_json[''after''][''camera''] == ''achterdeur''
}}'
- condition: template
value_template: '{{ trigger.payload_json[''after''][''camera''] == ''terras''
}}'
- condition: template
value_template: '{{ trigger.payload_json[''after''][''camera''] == ''veranda''
}}'
- condition: template
value_template: '{{ trigger.payload_json[''after''][''camera''] == ''bijkeuken''
}}'
action:
- action: notify.all_phones
data_template:
message: Er is een {{trigger.payload_json["after"]["label"]}} gedetecteerd op
de {{ trigger.payload_json["after"]["camera"] }} camera
data:
persistent: true
image: https://home.tigrou.nl/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg
tag: '{{trigger.payload_json["after"]["id"]}}'
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
entity_id: camera.{{trigger.payload_json["after"]["camera"]}}
mode: single
- alias: Theme - Switch to dark mode
id: theme_switch_dark
trigger:
- platform: time
at: '22:00:00'
- platform: sun
event: sunset
condition: '{{ is_state(''input_boolean.dark_mode'', ''off'') }}'
action:
entity_id: input_boolean.dark_mode
action: input_boolean.turn_on
- alias: Theme - Switch to light mode
id: theme_switch_light
trigger:
- platform: time
at: 09:00:00
- platform: sun
event: sunrise
condition: '{{ is_state(''input_boolean.dark_mode'', ''on'') }}'
action:
entity_id: input_boolean.dark_mode
action: input_boolean.turn_off
- id: theme_switch_manually
alias: Theme - Change theme manually
trigger:
- platform: state
entity_id: input_boolean.dark_mode
action:
- action: browser_mod.set_theme
data_template:
theme: custom-dark
dark: "{% if is_state(\"input_boolean.dark_mode\", \"on\") %}\n dark\n{% else
%}\n light\n{% endif %}\n"
- id: lovelace_convert_json_yaml
alias: Lovelace - convert lovelace.json to lovelace-ui.yaml
trigger:
- platform: state
entity_id: sensor.lovelace_size
action:
- action: shell_command.convert_lovelace
data: {}
- id: sjorsje_bin_full
alias: Vacuum - Sjorsje Bin Full
trigger:
- entity_id: binary_sensor.sjorsje_bin_full
platform: state
to: 'on'
action:
- action: notify.all_phones
data:
message: "\U0001F9F9 Sjorsje's opvangbak zit vol"
data:
persistent: true
tag: persistent
- alias: Vacuum - Sjorsje Battery Empty
id: sjorsje_battery_empty
trigger:
- entity_id: sensor.sjorsje_battery_level
platform: numeric_state
below: 20
action:
action: notify.all_phones
data:
message: "\U0001F50B Sjorsje's accu raakt leeg"
data:
persistent: true
tag: persistent
- id: '1618732336311'
alias: Dishwasher - Dishwasher ready
description: ''
use_blueprint:
path: sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
input:
power_sensor: sensor.vaatwasser_switch_current_consumption
actions:
- action: notify.all_phones
data:
message: De vaatwasser is klaar
data:
persistent: true
tag: persistent
- action: tts.google_translate_say
entity_id: media_player.office_googlehome
data_template:
message: De vaatwasser is klaar
- id: '1620203713941'
alias: Locks - Auto lock the doors
description: We didn't enable the Guest mode and we both left, lock the doors if
they are not
trigger:
- platform: state
entity_id:
- zone.home
to: '0'
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: state
entity_id: lock.nuki_voordeur_slot_lock
state: unlocked
action:
- action: lock.lock
target:
entity_id: lock.nuki_voordeur_slot_lock
data: {}
mode: single
- id: '1621189950296'
alias: Presence - Enable detection because one of us left or in night mode
description: Activate Frigate object detection
trigger:
- platform: state
for:
hours: 0
minutes: 0
seconds: 15
entity_id:
- zone.home
to: '1'
- platform: numeric_state
entity_id: zone.home
below: '2'
- platform: state
entity_id:
- alarm_control_panel.alarmo
from: disarmed
to: armed_night
condition: []
action:
- action: switch.turn_on