-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathautomations.yaml
executable file
·5090 lines (5065 loc) · 135 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
- alias: Backup HA Configuration Files
id: backup_config_files
trigger:
platform: time_pattern
hours: 1
minutes: 1
seconds: 0
condition:
condition: time
weekday:
- wed
action:
- service: shell_command.backup_configuration
- alias: Set Theme to Gabe
initial_state: 'on'
trigger:
- platform: homeassistant
event: start
action:
- service: frontend.set_theme
data:
name: ux_gabe
id: 4573bee121c64c6c99858ec229d57fd9
- alias: Start HomeKit
trigger:
- platform: homeassistant
event: start
action:
- delay: 00:05
- service: homekit.start
id: a17e9f13e20c4ec6aec93039e227cea7
- alias: Occupancy On
trigger:
- platform: state
entity_id: binary_sensor.people_home
from: 'off'
to: 'on'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.occupancy
id: f4d8dc544ef94b92b4b1458c04dc65f9
- alias: Occupancy Off
trigger:
- platform: state
entity_id: binary_sensor.people_home
from: 'on'
to: 'off'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.occupancy
id: c976d9206a9149e6ba6056c7712e2d56
- alias: Turn Off Lights on Leaving Home Zone
id: gabe_out_of_home_zone_lights_off
trigger:
- platform: state
entity_id: binary_sensor.people_home
from: 'on'
to: 'off'
for:
hours: 0
minutes: 15
seconds: 0
- platform: numeric_state
entity_id: sensor.home_occupancy_confidence
below: 51
for:
hours: 0
minutes: 15
seconds: 0
action:
- service: light.turn_off
entity_id:
- light.bedroom_desk
- light.bed_light
- light.desk
- light.entry_light
- light.kitchen
- light.kitchen_2
- light.table
- light.big_o
- light.et_figure
- service: media_player.media_pause
entity_id: media_player.mpd
- service: media_player.turn_off
entity_id: media_player.mpd
- service: browser_mod.navigate
data:
navigation_path: /lovelace/15
deviceID:
- browser_note_kiosk
- alias: Turn On Lights on Enter Home Zone
id: gabe_arrive_in_home_zone_lights_on
trigger:
- platform: state
entity_id: binary_sensor.people_home
from: 'off'
to: 'on'
action:
- service: light.turn_on
entity_id: light.entry_light
- service: script.turn_on
entity_id: script.welcome_lights_on
- alias: Welcome on Enter Home Zone
id: gabe_arrive_in_home_zone_welcome
trigger:
- entity_id: person.gabe
from: not_home
platform: state
to: home
condition:
condition: and
conditions:
- condition: time
before: '20:30:00'
after: '10:30:00'
- condition: state
entity_id: input_boolean.bed_occupancy
state: 'off'
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.gabe_arrive_in_home_zone_welcome'',
''last_triggered'')) | int > 10800 }}'
action:
- delay: 00:05:00
- service: script.turn_on
entity_id: script.thundercloud_celebrate
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
volume_level: 0.8
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
volume_level: 0.8
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
volume_level: 0.8
- service: media_player.play_media
data:
entity_id: media_player.mpd
media_content_id: https://thisisgabes.asuscomm.com/local/sounds/good_place_theme.mp3
media_content_type: music
- delay: 00:00:10
- service: script.janet_speech_engine
data:
call_greeting_gabe: 1
- delay: 00:00:10
- service: snapcast.restore
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
- service: snapcast.restore
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
- service: snapcast.restore
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
- service: light.turn_on
entity_id: light.et_figure
- delay: 00:05:00
- service: light.turn_off
entity_id: light.et_figure
- alias: Mom welcome
id: mom_arrive_in_home_zone_welcome
trigger:
- platform: zone
entity_id: person.berny
zone: zone.home
event: enter
action:
- delay: 00:02:30
- service: script.janet_speech_engine
data:
call_greeting_berny: 1
- service: script.turn_on
entity_id: script.thundercloud_celebrate
- service: light.turn_on
entity_id: light.et_figure
- delay: 00:05:00
- service: light.turn_off
entity_id: light.et_figure
- id: aaron_arrive_in_home_zone_welcome
alias: Aaron welcome
trigger:
- platform: zone
entity_id: person.aj
zone: zone.home
event: enter
condition:
condition: and
conditions:
- condition: time
before: '20:30:00'
after: '10:30:00'
- condition: state
entity_id: input_boolean.bed_occupancy
state: 'off'
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.aaron_arrive_in_home_zone_welcome'',
''last_triggered'')) | int > 10800 }}'
action:
- delay: 00:02:30
- service: script.turn_on
entity_id: script.thundercloud_celebrate
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
- service: snapcast.snapshot
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
volume_level: 0.8
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
volume_level: 0.8
- service: media_player.volume_set
data:
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
volume_level: 0.8
- service: media_player.play_media
data:
entity_id: media_player.mpd
media_content_id: https://thisisgabes.asuscomm.com/local/sounds/ff_victory.mp3
media_content_type: music
- delay: 00:00:06
- service: script.janet_speech_engine
data:
call_greeting_aaron: 1
- delay: 00:00:10
- service: snapcast.restore
entity_id: media_player.snapcast_client_b8_27_eb_79_e8_44
- service: snapcast.restore
entity_id: media_player.snapcast_client_b8_27_eb_e1_e2_66
- service: snapcast.restore
entity_id: media_player.snapcast_client_12_42_bf_4f_88_4f
- entity_id: light.et_figure
service: light.turn_on
- delay: 00:05:00
- entity_id: light.et_figure
service: light.turn_off
- service: notify.mobile_app_gabes_note_10
data:
message: AJ is home
mode: single
- alias: Morning Greeting
id: morning_greeting_update
trigger:
platform: state
entity_id: input_boolean.bed_occupancy
from: 'on'
to: 'off'
condition:
condition: and
conditions:
- condition: time
before: '11:30:00'
after: 07:30:00
- condition: state
entity_id: input_boolean.alarm_went_off
state: 'on'
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.morning_greeting'',
''last_triggered'')) | int > 10800 }}'
action:
- service: script.turn_on
entity_id: script.kiosk_good_morning
- alias: Dim Kiosk Screen
id: dim_kiosk_screen
trigger:
platform: state
entity_id: light.entry_light
from: 'on'
to: 'off'
action:
- service: rest_command.kiosk_screen_dim
- alias: Brighten Kiosk Screen
id: brihten_kiosk_screen
trigger:
platform: state
entity_id: light.entry_light
from: 'off'
to: 'on'
action:
- service: rest_command.kiosk_screen_mid
- alias: Turn off kiosk charger
trigger:
platform: template
value_template: '{{ 90 < (states["sensor.kiosk_battery"].state | int) }}'
action:
service: switch.turn_off
entity_id: switch.2437254184f3eb69e784
id: 9a77f9172e6d4be9a01ba0265252dd0b
- alias: Turn on kiosk charger
trigger:
platform: template
value_template: '{{ 15 > (states["sensor.kiosk_battery"].state | int) }}'
action:
service: switch.turn_on
entity_id: switch.2437254184f3eb69e784
id: 29295c9172d646fda45d2e6882d0492c
- alias: Start Up
trigger:
- event: start
platform: homeassistant
action:
- delay: 00:00:10
- service: media_player.play_media
data:
entity_id: media_player.mpd
media_content_id: https://thisisgabes.asuscomm.com/local/sounds/battle.mp3
media_content_type: music
- delay: 00:00:01
- service: notify.html5_push_gabes_note_10
data:
data:
renotify: 1
icon: https://thisisgabes.asuscomm.com/local/icons/smarthome.png
badge: https://thisisgabes.asuscomm.com/local/icons/badge_smarthome.png
timestamp: '%m'
url: https://thisisgabes.asuscomm.com
vibrate: 700, 700, 700
message: Home Assistant restarted at {{ as_timestamp(now()) | timestamp_custom('%H:%M',
true) }}
title: Hello World!
- delay:
seconds: 6
- service: script.janet_speech_engine
data:
call_greeting: 1
- delay:
seconds: 5
- service: script.janet_speech_engine
data:
call_introduction: 1
- delay:
seconds: 10
- service: alexa_media.update_last_called
- delay:
seconds: 5
- service: notify.alexa_media
data:
data:
type: tts
target:
- media_player.gabe_s_alexa
message: Alexa Tee Tee Ess is Connected
id: cbb75c03910d4f2f903b86bacca488ac
- alias: Set Harmony activity
trigger:
platform: state
entity_id: input_select.harmony
action:
service: remote.turn_on
entity_id: remote.gabes_harmony_hub
data_template:
activity: "{% if is_state(\"input_select.harmony\", \"Speaker\") %}\n 46675326\n\
{% elif is_state(\"input_select.harmony\", \"Fishtank Evening\") %}\n 25723108\n\
{% elif is_state(\"input_select.harmony\", \"Watch Roku\") %}\n 26106880\n\
{% elif is_state(\"input_select.harmony\", \"Watch a Movie\") %}\n 26106724\n\
{% elif is_state(\"input_select.harmony\", \"Fishtank Morning\") %}\n 25723061\n\
{% elif is_state(\"input_select.harmony\", \"Play PS4\") %}\n 46675206\n\
{% else %}\n -1\n{% endif %}\n"
id: dc13acfe2cbe4170a570e0e0c9a19e66
- alias: Update Harmony input_select
trigger:
platform: state
entity_id: remote.gabes_harmony_hub
action:
service: input_select.select_option
data_template:
entity_id: input_select.harmony
option: '{{ states.sensor.harmony_activity.state }}'
id: a5886890f7da4a6186502881be46aa6b
- alias: Turn on Wavemaker at high tide
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time_utc.state , "%H:%M") == strptime(states.sensor.reef_time_high_tide.state
, "%H:%M") }}'
action:
service: switch.turn_on
entity_id: switch.06200940dc4f22cbb94b_2
id: c4ce44153f364eada1160fed7b5441ae
- alias: Turn off Wavemaker at low tide
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time_utc.state , "%H:%M") == strptime(states.sensor.reef_time_low_tide.state
, "%H:%M") }}'
action:
service: script.turn_on
entity_id: script.reef_waves_lowtide_fade_script
id: 4e5f2fae8d184e97a45c9769448eac79
- alias: Turn on Amazon Waves at high tide
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%k:%M") == strptime(states.sensor.amazonnexthightide.state
, "%k:%M") }}'
action:
service: script.turn_on
entity_id: script.freshwater_waves_on_script
id: 47022a03da534d04bc1d8ef8ab2c3268
- alias: Turn on Amazon Waves again at low tide
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%k:%M") == strptime(states.sensor.amazonnextlowtide.state
, "%k:%M") }}'
action:
service: script.turn_on
entity_id: script.freshwater_waves_on_script
id: a41b4526bc774ab292271321c3fb2c70
- alias: Set sunrise and set with reef-pi
trigger:
platform: time
at: 04:15:00
action:
- service: rest_command.set_diurnal_reef_lights_brightness
- service: rest_command.set_diurnal_reef_lights_color
id: 5c14464f503c41fe871a782d6e0a599f
- alias: Turn Off Reef Lights Outlet at Sunset
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state,"%k:%M") == strptime(states.sensor.reeftime_sunset_adjustment.state,"%k:%M")
}}'
action:
- service: script.turn_on
entity_id: script.reeftank_evening_outlet_kessil
id: 77006dbc4ee84bb29980604ba7d756d1
- alias: Turn On Reef Lights Outlet at Sunrise
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state,"%H:%M") == strptime(states.sensor.reeftime_sunrise_adjustment.state,"%H:%M")
}}'
action:
- service: script.turn_on
entity_id: script.reeftank_morning_outlet_kessil
id: e42c76a3da63481294750045302700ab
- alias: Kessil Color
trigger:
platform: state
entity_id: input_number.kessil_color
condition:
condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
service: switch.turn_on
entity_id: switch.kessil_color_level
id: 3d0a7dc652e54a96a1229ce36e29e30c
- alias: Kessil Brightness
trigger:
platform: state
entity_id: input_number.kessil_brightness
condition:
condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
service: switch.turn_on
entity_id: switch.kessil_brightness_level
id: e0bee311d6734f978156f7f62374c5bc
- alias: Refugium Brightness
trigger:
platform: state
entity_id: input_number.refugium_brightness
condition:
condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
service: switch.turn_on
entity_id: switch.kessil_brightness_level
id: bb6e70e82ee645619a48cfa4223ed5cf
- alias: Garden Brightness
trigger:
platform: state
entity_id: input_number.garden_brightness
condition:
condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
service: switch.turn_on
entity_id: switch.garden_brightness_level
id: ca36ec7f72404131b7822d3698ca4373
- alias: Stop Reef Moon
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%H:%M") == strptime(states.sensor.reeftime_sunrise_adjustment.state
, "%H:%M") }}'
condition:
condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.35
below: 0.65
action:
- service: script.turn_on
entity_id: script.reeftank_moon_off
id: 323b859c70a64cfea6a4e8972a7103ff
- alias: Start Reef Moon
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%k:%M") == strptime(states.sensor.reeftime_sunset_adjustment.state
, "%k:%M") }}'
condition:
condition: or
conditions:
- condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.38
below: 0.48
- condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.53
below: 0.63
action:
- service: script.turn_on
entity_id: script.reeftank_moon_on
- service: script.turn_on
entity_id: script.reeftank_moon_up
id: 27600c3885f1494f8b52418a92b97c9e
- alias: Stronger Fade Up of Reef Moon
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%k:%M") == strptime(states.sensor.reeftime_sunset_adjustment.state
, "%k:%M") }}'
condition:
condition: or
conditions:
- condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.48
below: 0.49
- condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.51
below: 0.53
action:
- service: script.turn_on
entity_id: script.reeftank_moon_on
- service: script.turn_on
entity_id: script.reeftank_moon_up_stronger
id: 6ad15a6c67254c8c9e25b4c2b9c7df7b
- alias: Reef Full Moon
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%k:%M") == strptime(states.sensor.reeftime_sunset_adjustment.state
, "%k:%M") }}'
condition:
condition: numeric_state
entity_id: sensor.reef_weather_moon_phase_0d
above: 0.49
below: 0.51
action:
- service: script.turn_on
entity_id: script.reeftank_moon_on
- service: script.turn_on
entity_id: script.reeftank_full_moon
id: 83b85b073072439a8cb5f1e4bd4c882b
- alias: Freshwater Lights and O2 On at Sunrise
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%H:%M") == strptime(states.sensor.amazonsunrisetides.state
, "%H:%M") }}'
action:
- service: script.turn_on
entity_id: script.octotank_morning_on
id: 3db566d08a084432b836f266b1022410
- alias: Freshwater Lights and O2 Off at Sunset
trigger:
platform: template
value_template: '{{ strptime(states.sensor.time.state , "%H:%M") == strptime(states.sensor.amazonsunsettides.state
, "%H:%M") }}'
action:
- service: script.turn_on
entity_id: script.octotank_evening_off
id: 03794709dc104d4f8827ce4d573991e8
- alias: Activate Feeder Script Morning
trigger:
platform: time
at: 09:15:00
action:
- service: script.turn_on
entity_id: script.freshwater_feeder_script
id: 11f622831c1d451383339dcead41d20e
- alias: Activate Feeder Script Afternoon
trigger:
platform: time
at: '17:30:00'
action:
- service: script.turn_on
entity_id: script.freshwater_feeder_script
id: 3cae3cd9c98047cf9332166fa59c0148
- alias: Set Amazon Thermostat Max Daytime Selector
trigger:
platform: template
value_template: '{{ states.sensor.monthly_amazon_temp_med.state != states.climate.octo_tank_therm.attributes.temperature.state
}}'
condition:
condition: state
entity_id: switch.06200940dc4f22cbb432_4
state: 'on'
action:
service: climate.set_temperature
data_template:
entity_id: climate.octo_tank_therm
temperature: '{{ states.sensor.monthly_amazon_temp_med.state | float }}'
id: ef473a4c73ae4d00acfa38d0eb2ed0cf
- alias: Set Amazon Thermostat Max Night Selector
trigger:
platform: template
value_template: '{{ states.sensor.monthly_amazon_temp_lowmed.state != states.climate.octo_tank_therm.attributes.temperature.state
}}'
condition:
condition: state
entity_id: switch.06200940dc4f22cbb432_4
state: 'off'
action:
service: climate.set_temperature
data_template:
entity_id: climate.octo_tank_therm
temperature: '{{ states.sensor.monthly_amazon_temp_lowmed.state | float }}'
id: 668b6c6cb3064f12b38c30a1bc8fa5da
- alias: Set Reef Thermostat Max Daytime Selector
trigger:
platform: template
value_template: '{{ states.sensor.noaa_daily_max_reef_temp.state != states.climate.reef_tank_therm.attributes.temperature.state
}}'
condition:
condition: state
entity_id: input_boolean.reef_temp_daytime_state
state: 'on'
action:
service: climate.set_temperature
data_template:
entity_id: climate.reef_tank_therm
temperature: '{{ states.sensor.noaa_daily_max_reef_temp.state | float }}'
id: 2ae26c0e0112448cb39aa3d3ad34406d
- alias: Set Reef Thermostat Max Nighttime Selector
trigger:
platform: template
value_template: '{{ states.sensor.reef_low_avg_daily_temp.state != states.climate.reef_tank_therm.attributes.temperature.state
}}'
condition:
condition: state
entity_id: input_boolean.reef_temp_nightime_state
state: 'on'
action:
service: climate.set_temperature
data_template:
entity_id: climate.reef_tank_therm
temperature: '{{ states.sensor.reef_low_avg_daily_temp.state | float }}'
id: 31682c9c5d1348fa96dc704172ed9e13
- alias: Regulate Reef Heater To Off on Low Misread
trigger:
platform: template
value_template: '{{ 32 == states.sensor.onlyreefcontrolpitemp.state }}'
action:
service: switch.turn_off
entity_id: switch.06200940dc4f22cbb94b_3
id: 3375dd8bb45d43759f9b206ed1b53f46
- alias: Nightly Top OffOn
trigger:
- platform: time
at: '19:20:00'
action:
service: switch.turn_on
entity_id: switch.reef_ato_scheduled
id: 39ae208f76e94b23962bb3d0306a834e
- alias: Nightly Top OffOff
trigger:
- platform: time
at: '19:28:00'
action:
service: switch.turn_off
entity_id: switch.reef_ato_scheduled
id: 41e0afd737384a08b1ad7adc359701bc
- alias: download_noaa_temps
trigger:
- platform: time
at: 01:16:00
action:
- service: downloader.download_file
data_template:
url: https://coralreefwatch.noaa.gov/product/vs/data/great_nicobar.txt
filename: east_java_bali.txt
overwrite: true
id: 3e63dde657734b6280addac001c497a2
- alias: Reef Sump Pulse
trigger:
- platform: time_pattern
minutes: /4
condition:
condition: state
entity_id: sensor.reefcontrolpifloat
state: OK
action:
service: script.turn_on
entity_id: script.reeftank_sump_pulse
id: 266e3e58b82b4cc1b3b51e11bcc67402
- alias: Reef Sump Pump Low Off
trigger:
platform: state
entity_id: sensor.reefcontrolpifloat
from: OK
to: Low
action:
service: switch.turn_off
entity_id: switch.2437254184f3eb695276
id: a6649cbbd74844dfb35557e72936b745
- alias: Reef Sump Pump Low Timer
trigger:
platform: state
entity_id: sensor.reefcontrolpifloat
to: Low
for:
minutes: 5
action:
service: switch.turn_off
entity_id: switch.2437254184f3eb695276
id: e43423a0ae96481893b97eea30b0d221
- alias: ferns_needs_water
trigger:
platform: state
entity_id: binary_sensor.water_plant_alarm_ferns
to: 'on'
for:
minutes: 10
condition:
condition: and
conditions:
- condition: time
before: '22:30:00'
after: 09:30:00
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.ferns_needs_water'',
''last_triggered'')) | int > 43200 }}'
action:
- service: notify.html5_push
data:
data:
renotify: 1
icon: https://thisisgabes.asuscomm.com/local/icons/plant.png
badge: https://thisisgabes.asuscomm.com/local/icons/badge_plant.png
timestamp: '%m'
url: https://thisisgabes.asuscomm.com/lovelace/6
vibrate: 700, 700, 700
message: Your bedroom ferns need water. Soil moisture is currently at {{ states.sensor.plant_monitor_soil_moisture.state
}}%
title: I'm thirsty!
target:
- Gabes Mate
- Gabes Note 10
- Macbook
- macbookpro
- service: persistent_notification.create
data:
message: Your bedroom ferns need water. Soil moisture is currently at {{ states.sensor.plant_monitor_soil_moisture.state
}}%
title: Bedroom Ferns Water Alert!
- service: script.janet_speech_engine
data:
call_plant_alert: 1
call_bedroom_plant_warning: 1
id: b7b9668e481e4cf0ac4aa2454fb65436
- alias: plant_needs_water
trigger:
platform: numeric_state
entity_id: sensor.garden_monitor_soil_moisture
below: 10
condition:
condition: and
conditions:
- condition: time
before: '22:30:00'
after: 09:30:00
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.plant_needs_water'',
''last_triggered'')) | int > 43200 }}'
action:
- service: notify.html5_push
data:
data:
renotify: 1
icon: https://thisisgabes.asuscomm.com/local/icons/plant.png
badge: https://thisisgabes.asuscomm.com/local/icons/badge_plant.png
timestamp: '%m'
url: https://thisisgabes.asuscomm.com/lovelace/6
vibrate: 700, 700, 700
message: Your herb garden needs water. Soil moisture is currently at {{ states.sensor.garden_monitor_soil_moisture.state
}}%
title: I'm thirsty!
target:
- Gabes Mate
- Gabes Note 10
- Macbook
- macbookpro
- service: persistent_notification.create
data:
message: Your herb garden needs water. Soil moisture is currently at {{ states.sensor.garden_monitor_soil_moisture.state
}}%
title: Hydroponic Garden Water Alert!
id: e836da8cc5e245699b8c1a5388d80c10
- alias: empty_garden_drain
trigger:
platform: state
entity_id: binary_sensor.water_alarm_garden_res
to: 'on'
for:
minutes: 10
condition:
condition: and
conditions:
- condition: time
before: '22:30:00'
after: 09:30:00
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.empty_garden_drain'',
''last_triggered'')) | int > 43200 }}'
action:
- service: notify.html5_push
data:
data:
renotify: 1
icon: https://thisisgabes.asuscomm.com/local/icons/plant.png
badge: https://thisisgabes.asuscomm.com/local/icons/badge_pipe.png
timestamp: '%m'
url: https://thisisgabes.asuscomm.com/lovelace/6
vibrate: 700, 700, 700
message: Empty the drainage reservoir soon. It is currently at {{ states.sensor.garden_monitor_water_level.state
}}%
title: Empty me!
target:
- Gabes Mate
- Gabes Note 10
- Macbook
- macbookpro
- service: persistent_notification.create
data:
message: Empty the drainage reservoir soon. It is currently at {{ states.sensor.garden_monitor_water_level.state
}}%
title: Hydroponic Garden Reservoir Alert!
id: 4c7c9c92b4934e38b5954e7a506ff98b
- alias: garden_bot_alert
trigger:
platform: state
entity_id: device_tracker.amazon_tank
condition:
- condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
- service: ifttt.trigger
data_template:
event: change_of_ip
value1: GardenBot changed state to {{ states.device_tracker.amazon_tank.state
}}
id: 2f8dce51e38842ef9d7be00a34df7b59
- alias: ip_change_alert
trigger:
platform: state
entity_id: sensor.ip_address
condition:
- condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
- service: ifttt.trigger
data_template:
event: change_of_ip
value1: '{{ states.sensor.ip_address.state }}'
id: 598f339b007140a1b238467084f60fcf
- alias: usps_mail_alert
trigger:
platform: zone
entity_id: device_tracker.gabes_galaxy_note10_2
zone: zone.home
event: enter
condition:
condition: or
conditions:
- condition: numeric_state
entity_id: sensor.mail_usps_mail
above: '0'
- condition: numeric_state
entity_id: sensor.mail_usps_packages
above: '0'
action:
- service: script.turn_on
entity_id: script.usps_sms_notification
id: 8cd9bebc4391463190302d54d7024775
- alias: usps_mail_alert_automation_on
trigger:
- platform: numeric_state
entity_id: sensor.mail_usps_mail
above: '0'
- platform: numeric_state
entity_id: sensor.mail_usps_packages
above: '0'
action:
- service: automation.turn_on
entity_id: automation.usps_mail_alert
id: 54958a7504254dbab1fc6ce636f32e73
- alias: usps_mail_alert_automation_off
trigger:
- platform: numeric_state
entity_id: sensor.mail_usps_mail
below: '1'
action:
- service: automation.turn_off
entity_id: automation.usps_mail_alert
id: 8ae9fb8055424e45a271362e3ad38c1a
- alias: Update USPS Mail Camera
trigger:
- platform: state
entity_id: sensor.mail_usps_mail
action:
- service: local_file.update_file_path
data_template:
entity_id: camera.mail_usps
file_path: '{% if state_attr(''sensor.mail_usps_mail'',''image'') == None %}
/config/custom_components/mail_and_packages/mail_none.gif {% else %} /home/homeassistant/.homeassistant/images/mail_and_packages/{{
state_attr(''sensor.mail_usps_mail'',''image'') }} {% endif %}
'
id: ce82d0829a1545039ef26f2ec1c2bf57
- alias: octoprint_finished
trigger:
platform: numeric_state
entity_id: sensor.octoprint_job_percentage
above: 96
condition:
condition: and
conditions:
- condition: time
before: '23:30:00'
after: 09:30:00
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.octoprint_finished'',
''last_triggered'')) | int > 3000 }}'
action:
- service: camera.snapshot
data:
entity_id: camera.octopi3dprinter
filename: /www/snapshots/3dprinter_{{ now().strftime("%Y%m%d-%H") }}.jpg
- service: notify.html5_push
data:
data:
renotify: 1
icon: https://thisisgabes.asuscomm.com/local/icons/robot5.png
badge: https://thisisgabes.asuscomm.com/local/icons/badge_roomba.png
image: https://thisisgabes.asuscomm.com/local/snapshots/3dprinter_{{ now().strftime("%Y%m%d-%H")
}}.jpg
timestamp: '%m'
url: https://thisisgabes.asuscomm.com/lovelace/7
vibrate: 700, 700, 700
message: Your 3D print is {{ states.sensor.octoprint_job_percentage.state }}
done after {{ states.sensor.sensor.octoprint_time_elapsed_format.state }}%
title: Neato!
target:
- Gabes Mate
- Gabes Note 10
- Macbook
- macbookpro
- service: persistent_notification.create
data:
message: Your 3D print is {{ states.sensor.octoprint_job_percentage.state }}
done after {{ states.sensor.sensor.octoprint_time_elapsed_format.state }}%
title: Neato!
id: 3495a57e83b34033bffd1fd8344ef732
- alias: download_octoprint_timelapse
trigger:
platform: state
entity_id: sensor.octoprint_current_state
to: Idle
for:
minutes: 3
action:
- service: downloader.download_file
data_template:
url: '{{ states("sensor.octoprint_timelapse_url_full") }}'
filename: latest_timelapse.mpg
overwrite: true
subdir: octoprint
- service: downloader.download_file
data_template:
url: '{{ states("sensor.octoprint_timelapse_url_full") }}'
filename: latest_timelapse.mp4
overwrite: true
subdir: octoprint
id: cc521fe7ac3f484aa4dfde519b9d0116
- id: rpi_power_issue
alias: Power Problem Notification
trigger:
- platform: numeric_state
entity_id: sensor.rpi_power_status
above: 0
for:
minutes: 1
condition:
action: