-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
2765 lines (2750 loc) · 75 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: homeassistant_update_notification
alias: ⚙️HomeAssistant Update notification
triggers:
- entity_id:
- update.home_assistant_core_update
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.minor_version_update
state: 'on'
sequence:
- action: notify.mobile_app_pixel8pro
data:
message: "Auto updating {{states.update.home_assistant_core_update.attributes.installed_version\n
}} → {{ states.update.home_assistant_core_update.attributes.latest_version
}}"
title: "\U0001F195 Minor version Updating!"
data:
notification_icon: mdi:package-up
subject: Home Assistant {{states.update.home_assistant_core_update.attributes.latest_version}}
is available.
tag: update
clickAction: /lovelace/updates
icon_url: /local/images/party.png
sticky: 'true'
- action: update.install
metadata: {}
data:
backup: true
target:
entity_id: update.home_assistant_core_update
- conditions:
- condition: state
entity_id: binary_sensor.minor_version_update
state: 'off'
sequence:
- action: notify.mobile_app_pixel8pro
data:
message: "{{states.update.home_assistant_core_update.attributes.installed_version\n
}} → {{ states.update.home_assistant_core_update.attributes.latest_version
}}"
title: "\U0001F195 Update Available!"
data:
notification_icon: mdi:package-up
subject: Home Assistant {{states.update.home_assistant_core_update.attributes.latest_version}}
is available.
tag: update
clickAction: /lovelace/updates
icon_url: /local/images/party.png
sticky: 'true'
mode: single
- id: spotify_playback
alias: "\U0001F3B5Spotify Selected Device Force playback"
description: ''
trigger:
- platform: state
entity_id: input_select.speakers_spotify
condition: []
action:
- action: script.spotify_start
mode: single
- id: music_spotify
alias: "\U0001F3B5Music Jukebox"
trigger:
- platform: event
event_type: tag_scanned
condition:
- condition: template
value_template: '{{ trigger.event.data.tag_id in tags }}'
action:
- variables:
uri: '{{ tags[trigger.event.data.tag_id].uri }}'
- action: spotcast.start
data:
device_name: '{% if is_state(''media_player.spotify'', ''playing'') %} {{state_attr("media_player.spotify",
"source")}} {%else%}{{ states(''input_select.speakers_spotify'') }}{%endif%}'
uri: '{{ uri }}'
random_song: true
force_playback: true
shuffle: true
mode: restart
variables:
tags:
04-BD-F1-F2-03-68-80:
uri: spotify:playlist:2OTjSlEoXXnrv6L5ryw3sV?si=a00c6c678ef446c5
04-C5-F1-F2-03-68-80:
uri: spotify:playlist:5QTClPorWVvK650livXyEr?si=69a587c913554a73
04-60-50-0A-22-6F-81:
uri: spotify:playlist:37i9dQZF1DZ06evO1SVXaM
04-5C-51-0A-22-6F-81:
uri: spotify:artist:4DHXXUP4qza7DacDKVT23G?si=k7eCA-BRRsaXNTzN0ulD5w
04-6A-50-0A-22-6F-81:
uri: spotify:playlist:7zozfVwEIRnlZVhWAjCvh4?si=ef9e4f4789d24d93
04-73-50-0A-22-6F-81:
uri: spotify:playlist:4McZ2miIU3GteSwmAAxCrJ?si=F0Vg19zkRTi3g3Y4DyQeMA
04-77-51-0A-22-6F-81:
uri: spotify:playlist:2DsO6uDqyONHtelhjUbYix?si=mFYPVbLaTnGI-IAQQiAYa
04-53-51-0A-22-6F-81:
uri: spotify:playlist:37i9dQZF1DZ06evO0KEAbC?si=be9f74962433475f
04-4B-51-0A-22-6F-81:
uri: spotify:playlist:10N88juIQN9zO7a2FdPpAr?si=puXar2w3QmS-byDzvCr5Mw
04-3B-51-0A-22-6F-81:
uri: spotify:playlist:42WlES4C0cTGvjO4aquO7f?si=IlBYKTckTnGxSz7chv6GpQ
04-43-51-0A-22-6F-81:
uri: spotify:playlist:113zomdc3VfahCRJ0vuVML?si=434e184ad0914c94
04-10-51-0A-22-6F-81:
uri: spotify:playlist:1DRN46YWHKyrZ6CmF1ykJw?si=pKimy_gJQJiBQeVzVXeoCA
04-18-51-0A-22-6F-81:
uri: spotify:playlist:7kWWQq0gZHaGmy4NfjnOj5?si=KDeC7IiATtSp3Qsro5njeg
04-20-51-0A-22-6F-81:
uri: spotify:playlist:37i9dQZF1DZ06evO1MVYmm?si=ZQxQ1t9zTzKq7lRgvfMP2Q
04-33-51-0A-22-6F-81:
uri: spotify:playlist:37i9dQZEVXcWjFlf2abaJx?si=c4588564cf784c02
04-28-51-0A-22-6F-81:
uri: spotify:artist:6XyY86QOPPrYVGvF9ch6wz?si=ANPiWS39QSGCWHBBMMW1Ow
04-50-50-0A-22-6F-81:
uri: spotify:album:4m2880jivSbbyEGAKfITCa?si=pacROChHSFSDEs5XIYtzTQ
04-D5-F1-F2-03-68-80:
uri: spotify:playlist:37i9dQZF1EJMBmrEbDk6wO?si=577fdf28736140e5
04-CD-F1-F2-03-68-80:
uri: spotify:playlist:37i9dQZF1EJBSlh2ABgMAk?si=7f1ec20760fc407d
04-DD-F1-F2-03-68-80:
uri: spotify:playlist:2XPCqkfm5o7HHjLZ4b4ntS?si=45d4f05eeaf04eff
04-F5-F1-F2-03-68-80:
uri: spotify:playlist:37i9dQZF1DZ06evO3vNCZb
- id: player_controls
alias: "\U0001F3B5Player Controls"
description: ''
trigger:
- platform: event
event_type: tag_scanned
condition:
- condition: template
value_template: '{{ trigger.event.data.tag_id in tags }}'
action:
- variables:
action: '{{ tags[trigger.event.data.tag_id].service }}'
- action: '{{ action }}'
target:
entity_id: media_player.spotify
mode: restart
variables:
tags:
previous:
action: media_player.media_previous_track
play/pause:
action: media_player.media_play_pause
next:
action: media_player.media_next_track
- id: '1636123727125'
alias: ⚙️Shopping list update
description: ''
trigger:
- platform: state
entity_id: input_text.shopping_list
condition: []
action:
- action: script.add_shopping_list
data: {}
mode: single
- id: '1638974963835'
alias: ⚙️Homeassistant Start/Stop
description: Runs various automations based on homeassistant starting or stopping.
triggers:
- event: shutdown
id: shutdown
trigger: homeassistant
- event: start
id: start
trigger: homeassistant
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: shutdown
sequence: []
- conditions:
- condition: trigger
id: start
sequence:
- action: pyscript.f1driverstandings
data: {}
- action: pyscript.f1constructorstandings
data: {}
- action: rest_command.reload_google_sheets_music
data: {}
- action: rest_command.reload_google_sheets_weight
data: {}
- action: rest_command.reload_google_sheets_weight2
data: {}
default: []
mode: single
- id: '1654855874344'
alias: ⚙️Convert Lovelace configuration to yaml
description: ''
trigger:
- platform: event
event_type: lovelace_updated
event_data: {}
condition: []
action:
- action: shell_command.lovelace_default_convert
data: {}
mode: single
- id: '1655137751596'
alias: ⚙️Tag Github with version when core updated
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- action: hassio.addon_restart
metadata: {}
data:
addon: core_git_pull
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- condition: template
value_template: '{{states.sensor.current_version.state > states.sensor.n00bcodr_homeassistant_latest_tag.state}}'
- action: notify.mobile_app_pixel8pro
data:
message: Update tag in GitHub?
title: Home Assistant Core Updated!
data:
tag: update
notification_icon: mdi:git
icon_url: /local/images/HA_logo.png
color: red
actions:
- action: tag_update
title: Update!
- action: URI
title: Open Repo
uri: https://github.com/n00bcodr/homeassistant
mode: single
- id: '1655814095516'
alias: "\U0001F3ACCapture Shared URL - Google TV"
description: Captures the URL shared and updates input_text ccgtv_share_url
trigger:
- platform: event
event_type: mobile_app.share
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data|regex_search(''com.netflix'', ignorecase=TRUE)
}}'
sequence:
- action: input_text.set_value
data:
value: '{{ trigger.event.data.text|regex_findall_index(find=''(http.*)'',
ignorecase=TRUE) }}
'
target:
entity_id: input_text.ccgtv_share_url
- conditions:
- condition: template
value_template: '{{ trigger.event.data|regex_search(''com.amazon'', ignorecase=TRUE)
}}'
sequence:
- action: input_text.set_value
data:
value: '{{ trigger.event.data.text|regex_findall_index(find=''(http.*)'',
ignorecase=true)|replace ("&ref_=atv_dp_share_seas&r=web", "") }}
'
target:
entity_id: input_text.ccgtv_share_url
- conditions:
- condition: template
value_template: '{{ trigger.event.data|regex_search(''startv.hotstar'', ignorecase=TRUE)
}}'
sequence:
- action: input_text.set_value
data:
value: '{{ trigger.event.data.text|regex_findall_index(find=''(http.*)'',
ignorecase=TRUE) }}
'
target:
entity_id: input_text.ccgtv_share_url
- conditions:
- condition: template
value_template: '{{ trigger.event.data|regex_search(''youtu.be'', ignorecase=TRUE)
}}'
sequence:
- action: input_text.set_value
data:
value: '{{ trigger.event.data.url|regex_findall_index(find=''(http.*)'',
ignorecase=TRUE) }}
'
target:
entity_id: input_text.ccgtv_share_url
default:
- action: notify.persistent_notification
data:
message: '{{ states(''input_text.ccgtv_share_url'') }}'
- action: androidtv.adb_command
data:
entity_id: media_player.google_tv
command: HOME
- action: script.load_share_url_googletv
data: {}
mode: single
- id: '1670537821206'
alias: "\U0001F3F0Den off"
description: Turns off all things in DEN when I exit.
trigger:
- platform: tag
tag_id: 5f5bedc8-6a15-486a-ab22-49ce237dde40
enabled: true
- platform: event
event_type: mobile_app_notification_action
event_data:
action: Den_OFF
- platform: state
entity_id:
- input_boolean.den
from: 'on'
to: 'off'
- platform: device
domain: mqtt
device_id: 3fd72c6a517024c03b9531259c2d55d9
type: action
subtype: long
discovery_id: 0x00124b001eaa8251 action_long
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{(states.media_player.spotify.attributes.source) != ''Pixel
8 Pro''}}'
sequence:
- action: scene.create
data:
scene_id: den_as_it_was
snapshot_entities:
- switch.workstation
- light.light
- media_player.spotify
- light.shapes
- climate.heater
- action: homeassistant.turn_off
data: {}
target:
entity_id:
- switch.workstation
- light.shapes
- light.light
- climate.heater
- action: media_player.media_pause
data: {}
target:
entity_id:
- media_player.spotify
- conditions:
- condition: template
value_template: '{{(states.media_player.spotify.attributes.source) == ''Pixel
8 Pro''}}'
sequence:
- action: scene.create
data:
scene_id: den_as_it_was
snapshot_entities:
- switch.workstation
- light.light
- light.shapes
- action: homeassistant.turn_off
data: {}
target:
entity_id:
- switch.workstation
- light.shapes
- light.light
mode: single
- id: '1670578939434'
alias: "\U0001F3F0Den Button"
description: ''
trigger:
- platform: device
domain: mqtt
device_id: 3fd72c6a517024c03b9531259c2d55d9
type: action
subtype: single
discovery_id: 0x00124b001eaa8251 action_single
id: click
- platform: device
domain: mqtt
device_id: 3fd72c6a517024c03b9531259c2d55d9
type: action
subtype: double
discovery_id: 0x00124b001eaa8251 action_double
id: doubleclick
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: click
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.light
state: 'on'
sequence:
- action: homeassistant.turn_off
data: {}
target:
entity_id: light.light
- conditions:
- condition: state
entity_id: light.light
state: 'off'
sequence:
- action: light.turn_on
data:
color_temp: 153
brightness_pct: 100
target:
entity_id: light.light
default: []
- conditions:
- condition: trigger
id: doubleclick
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.light
state: 'on'
sequence:
- action: homeassistant.turn_off
target:
entity_id: light.light
data: {}
- conditions:
- condition: state
entity_id: light.light
state: 'off'
sequence:
- action: light.turn_on
data:
color_temp: 500
brightness_pct: 100
target:
entity_id: light.light
default: []
default: []
mode: single
- id: '1671637864679'
alias: "\U0001F3F0Den as it was"
description: Returns Den State to back what it was when Den OFF was triggered.
trigger:
- platform: state
entity_id:
- input_boolean.den
from: 'off'
to: 'on'
condition: []
action:
- action: scene.turn_on
data: {}
entity_id: scene.den_as_it_was
mode: single
- id: '1671638012875'
alias: "\U0001F3F0Send notification if no motion in Den"
description: ''
trigger:
- platform: state
entity_id: binary_sensor.den_motion_occupancy
to: 'off'
for: 00:04:00
from: 'on'
condition:
- condition: and
conditions:
- condition: time
after: 09:00:00
before: '21:00:00'
enabled: false
- condition: or
conditions:
- condition: state
entity_id: switch.workstation
state: 'on'
- condition: state
entity_id: binary_sensor.chair_occupancy
state: 'off'
enabled: true
for:
hours: 0
minutes: 5
seconds: 0
action:
- action: notify.mobile_app_pixel8pro
data:
title: Are you there?
message: 'No motion detected in Den in the last 5 minutes. '
data:
actions:
- action: Den_OFF
title: 'NO'
notification_icon: mdi:motion-sensor-off
tag: den_off
icon_url: /local/images/ninja.png
mode: single
- id: '1671638403506'
alias: "\U0001F3F0Desk Presence Detection"
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.vibration_vibration
to: 'on'
condition:
- condition: and
conditions:
- condition: time
after: 08:00:00
before: '22:00:00'
- condition: state
entity_id: switch.workstation
state: 'off'
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.den
state: 'off'
sequence:
- action: automation.trigger
target:
entity_id: automation.den_as_it_was
data: {}
- conditions:
- condition: state
entity_id: input_boolean.den
state: 'on'
sequence:
- action: homeassistant.turn_on
data: {}
target:
entity_id: switch.workstation
default: []
mode: single
- id: '1672227190927'
alias: "\U0001F3F0Clear Notification when motion is detected"
description: ''
trigger:
- platform: state
entity_id: binary_sensor.den_motion_occupancy
from: 'off'
to: 'on'
enabled: false
- platform: state
entity_id:
- binary_sensor.chair_occupancy
from: 'off'
to: 'on'
condition: []
action:
- action: notify.mobile_app_pixel8pro
data:
data:
tag: den_off
message: clear_notification
mode: single
- id: '1672404137791'
alias: "\U0001F3F0 Bed IFTTT"
description: ''
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: call_service
action:
service_template: '{{ trigger.event.data.service }}'
data_template:
entity_id: '{{ trigger.event.data.entity_id }}'
- id: '1674758476057'
alias: "\U0001F4A1Living Room Light Presence"
description: ''
triggers:
- entity_id:
- binary_sensor.living_room_presence
to: 'on'
from: 'off'
id: presence
trigger: state
- entity_id:
- binary_sensor.living_room_presence
to: 'off'
from: 'on'
id: clear
trigger: state
conditions:
- condition: and
conditions:
- condition: state
entity_id: light.led_strip
state: 'off'
- condition: state
entity_id: media_player.google_tv_streamer_remote
state: 'off'
- condition: state
entity_id: light.chandelier
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- presence
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: numeric_state
entity_id: sensor.presence_sensor_light_level
below: 40
sequence:
- action: light.turn_on
data:
color_temp: 500
brightness: 255
target:
entity_id: light.living_room_lamp
- conditions:
- condition: trigger
id:
- clear
sequence:
- action: homeassistant.turn_off
data: {}
target:
entity_id: light.living_room_lamp
mode: queued
max: 10
- id: '1675093554282'
alias: "\U0001F9FA\U0001F4F3Wash Cycle Notification"
description: ''
trigger:
- platform: state
entity_id:
- sensor.washing_machine_state
from: Spinning
to: Idle
id: wash
- platform: state
entity_id:
- sensor.washing_machine_state
from: Drying
to: Idle
id: dry
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: wash
sequence:
- action: notify.all_phones
data:
data:
tag: wash_cycle
message: clear_notification
alias: Clear Existing Notifications
- wait_for_trigger:
- platform: state
entity_id:
- sensor.washing_machine_state
to: Cycle Complete
continue_on_timeout: false
- action: notify.all_phones
data:
message: at {{ as_timestamp(now()) | timestamp_custom('%-I:%M %p')}}
data:
notification_icon: mdi:washing-machine
icon_url: /local/images/washing_machine.png
sticky: 'true'
image: /local/images/washing_machine.png
tag: wash_cycle
title: "\U0001F9FA Wash Cycle Complete"
- conditions:
- condition: trigger
id: dry
sequence:
- action: notify.all_phones
data:
data:
tag: wash_cycle
message: clear_notification
alias: Clear Existing Notifications
- wait_for_trigger:
- platform: state
entity_id:
- sensor.washing_machine_state
to: Cycle Complete
continue_on_timeout: false
- action: notify.all_phones
data:
message: at {{ as_timestamp(now()) | timestamp_custom('%-I:%M %p')}}
data:
notification_icon: mdi:washing-machine
image: /local/images/washing_machine.png
tag: wash_cycle
sticky: 'true'
title: "\U0001F9FA Dry Cycle Complete"
mode: single
- id: '1675437001659'
alias: "\U0001F6AE\U0001F4F3Bin Pickup Notification"
description: ''
triggers:
- at: '11:00:00'
id: morning
enabled: true
trigger: time
- at: '21:00:00'
id: night
trigger: time
conditions:
- alias: Check if the collection is in the next two days
condition: template
value_template: '{{ state_attr(''sensor.black_bin'', ''next_collection'') <= 2
or state_attr(''sensor.blue_bin'', ''next_collection'') <= 2 }}
'
actions:
- choose:
- conditions:
- condition: template
value_template: '{{(state_attr("sensor.black_bin", "next_collection")) ==
2 }}'
alias: Black Bin Next Collection is in 2 Days
- condition: trigger
id:
- morning
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
activationMode: foreground
notification_icon: mdi:trash-can-outline
icon_url: /local/images/black_bin.png
tag: bin_pickup
color: black
image: /local/images/black_bin.png
message: Pickup is in two days on {{ states.sensor.black_bin.state}}
title: Black Bin
- conditions:
- alias: Black Bin Next Collection is tomorrow
condition: template
value_template: '{{(state_attr("sensor.black_bin", "next_collection")) ==
1 }}'
- condition: trigger
id:
- morning
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
notification_icon: mdi:trash-can-outline
icon_url: /local/images/black_bin.png
color: black
tag: bin_pickup
image: /local/images/black_bin.png
message: Pickup is tomorrow, {{ states.sensor.black_bin.state}}
title: Black Bin
alias: Black Bin collection is tomorrow and it is 11 AM
- conditions:
- condition: template
value_template: '{{(state_attr("sensor.black_bin", "next_collection")) ==
1 }}'
alias: Black Bin Next Collection is in 1 Day
sequence:
- repeat:
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
notification_icon: mdi:trash-can
color: black
icon_url: /local/images/black_bin.png
tag: bin_pickup
actions:
- action: BIN_OUT
title: Yeah, the bin is out!
message: Put the Black Bin out.
title: Black Bin
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
until:
- condition: template
value_template: '{{ states.input_boolean.bin.last_updated.timestamp()
> (as_timestamp(now()) - 3600) }}
'
alias: Black Bin collection is tomorrow, is the bin out?
- conditions:
- condition: template
value_template: '{{(state_attr("sensor.blue_bin", "next_collection")) == 2
}}'
alias: Blue Bin Next Collection is in 2 Days
- condition: trigger
id:
- morning
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
notification_icon: mdi:trash-can
icon_url: /local/images/blue_bin.png
image: /local/images/blue_bin.png
tag: bin_pickup
color: blue
message: Pickup is in two days on {{ states.sensor.blue_bin.state}}
title: Blue Bin
- conditions:
- alias: Blue Bin Next Collection is tomorrow
condition: template
value_template: '{{(state_attr("sensor.blue_bin", "next_collection")) == 1
}}'
- condition: trigger
id:
- morning
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
notification_icon: mdi:trash-can
icon_url: /local/images/blue_bin.png
image: /local/images/blue_bin.png
tag: bin_pickup
color: blue
message: Pickup is tomorrow, {{ states.sensor.blue_bin.state}}
title: Blue Bin
alias: Blue Bin Collection is tomorrow and it is 11 AM
- conditions:
- condition: template
value_template: '{{(state_attr("sensor.blue_bin", "next_collection")) == 1
}}'
alias: Blue Bin Next Collection is in 1 Day
sequence:
- repeat:
sequence:
- action: notify.all_phones
data:
data:
tag: bin_pickup
message: clear_notification
- action: notify.all_phones
data:
data:
notification_icon: mdi:trash-can
color: blue
icon_url: /local/images/blue_bin.png
tag: bin_pickup
actions:
- action: BIN_OUT
title: Yeah, the bin is out!
message: Put the Blue Bin out.
title: Blue Bin
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
until:
- condition: template
value_template: '{{ states.input_boolean.bin.last_updated.timestamp()
> (as_timestamp(now()) - 3600) }}
'
alias: Blue Bin collection is tomorrow, is the bin out?
mode: single
- id: '1677184691191'
alias: "\U0001F525Start/stop Timer when heating is turned on/off"
description: ''
triggers:
- entity_id:
- switch.heating
for:
hours: 0
minutes: 0
seconds: 0
id: 'on'
from: 'off'
to: 'on'
trigger: state
- entity_id:
- switch.heating
for:
hours: 0
minutes: 0
seconds: 0
id: 'off'
from: 'on'
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: 'on'
sequence:
- action: timer.start
data:
duration: 01:30:00
target:
entity_id: timer.heating
- action: notify.mobile_app_pixel8pro
data:
message: "\U0001F525 Heating"
data:
chronometer: true
when: '{{ ((as_timestamp(now()) + 5400 ) - as_timestamp(''1970-01-01T00:00:00Z''))
| int }}'
notification_icon: mdi:heating-coil
sticky: true
persistant: true
tag: heat
actions:
- action: URI
title: Switch
uri: entityId:switch.heating
- action: switch.turn_off
title: 'Off'
entity_id: switch.heating
- conditions:
- condition: trigger
id: 'off'
sequence:
- action: timer.cancel
data: {}
target:
entity_id: timer.heating
- action: notify.mobile_app_pixel8pro
data:
message: clear_notification
data:
tag: heat
mode: single
- id: '1677263065986'
alias: "\U0001F525Turn off heating after X minutes"
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.heating
condition: