-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
502 lines (500 loc) · 13.4 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
- id: '1548594082873'
alias: Update Available Notifications
trigger:
- entity_id: updater.updater
platform: state
condition: []
action:
- data:
message: Update for Home Assistant is available.
service: notify.mobile_app_kim_alster_glimberg
- data:
message: Update for Home Assistant is available.
service: notify.gmail
- alias: Change state to Home when Alarm is disarmed
trigger:
- platform: state
entity_id: alarm_control_panel.skumparp_alarm
from: armed_away
to: disarmed
action:
- service: input_select.select_option
data:
entity_id: input_select.home_status
option: Home
id: 5dc21f7b3008473bb014147eb9c4c2fe
- alias: Change state to Away when Alarm is armed
trigger:
- platform: state
entity_id: alarm_control_panel.skumparp_alarm
from: disarmed
to: armed_away
action:
- service: input_select.select_option
data:
entity_id: input_select.home_status
option: Away
id: da1d4c57d6744f95bbf9148421ba61b4
- id: 7a51e31823014c0da831599eb662af08
alias: Turn off lights in kids room when coming home late
trigger:
- entity_id: input_select.home_status
platform: state
condition:
- condition: and
conditions:
- condition: state
entity_id: input_select.home_status
state: Home
- after: '19:30'
condition: time
action:
- service: homeassistant.turn_off
data: {}
target:
entity_id: group.fonster_lampor_barn_rum
area_id: selmas_rum
- data: {}
entity_id: light.skyfacing_zha_group_0x0002
service: homeassistant.turn_off
mode: single
- alias: Turn off lights in bedroom when coming home late
trigger:
- platform: state
entity_id: input_select.home_status
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.home_status
state: Home
- condition: time
after: '21:00:00'
action:
- service: homeassistant.turn_off
entity_id: group.fonster_lampor_sovrum
id: 58f6acdc48cc4110bcbf9bef28f34bff
- alias: Turn on game and tv in Sams room when home and when between 9am and 8pm.
trigger:
- platform: state
entity_id: input_select.home_status
- platform: time
at: 09:00:00
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.home_status
state: Home
- condition: time
before: '19:30:00'
- condition: time
after: 08:59:00
action:
- service: homeassistant.turn_on
entity_id: switch.sovrum_sam_tv_nexa_4
id: 96450b1e953d4b248893abafbd308bf4
- alias: Turn off game and tv in Sams room when not home and when between 8pm and
9am.
trigger:
- platform: state
entity_id: input_select.home_status
- platform: time
at: '19:30:00'
condition:
condition: or
conditions:
- condition: state
entity_id: input_select.home_status
state: Away
- condition: and
conditions:
- condition: time
after: '19:29:00'
- condition: time
before: 09:00:00
action:
- service: homeassistant.turn_off
entity_id: switch.sovrum_sam_tv_nexa_4
id: a630bbb6ad27456da3f26f01c62c6cee
- id: ae163c926136455dab10ccb2a479d21d
alias: Turn off all lights if it is very late and the lights are still on
trigger:
- at: 00:00:00
platform: time
condition:
- condition: state
entity_id: group.all_fonster_lampor
state: 'on'
action:
- service: homeassistant.turn_off
data: {}
target:
entity_id: group.all_fonster_lampor
area_id: selmas_rum
- entity_id: input_boolean.morning_mode
service: input_boolean.turn_off
- data: {}
entity_id: light.all_skyfacing_zha_group_0x0003
service: homeassistant.turn_off
- service: notify.mobile_app_kim_alster
data: {}
- service: scene.turn_on
target:
entity_id: scene.living_room_night_mode
metadata: {}
mode: single
- id: 90e4b8a6d24f4e7895b2024d813fa370
alias: Turn on lights at sunset
trigger:
- event: sunset
offset: -00:45:00
platform: sun
condition:
- condition: or
conditions:
- before: '19:30'
condition: time
- condition: state
entity_id: input_select.home_status
state: Away
action:
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.all_fonster_lampor
- light.outdoor_lights_zha_group_0x0004
area_id: selmas_rum
mode: single
- id: 367e8e9bcb0243b1b09bfeb44cb115e9
alias: Turn off lights at sunsrise
trigger:
- event: sunrise
offset: 00:45:00
platform: sun
action:
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- group.all_fonster_lampor
- group.ute_belysning
- light.outdoor_lights_zha_group_0x0004
device_id: 6fca75873368e10a98ab21a8da1ae5be
mode: single
- id: cb67ff6e29444b1cafd6b35dc148b42a
alias: Turn off lights in Kids room if home
trigger:
- at: '19:30'
platform: time
condition:
- condition: state
entity_id: input_select.home_status
state: Home
action:
- service: homeassistant.turn_off
data: {}
target:
entity_id: group.fonster_lampor_barn_rum
area_id: selmas_rum
- data: {}
entity_id: light.skyfacing_zha_group_0x0002
service: homeassistant.turn_off
mode: single
- alias: Turn off lights in bedroom if home
trigger:
- platform: time
at: '21:00:00'
condition:
condition: state
entity_id: input_select.home_status
state: Home
action:
- service: homeassistant.turn_off
entity_id: group.fonster_lampor_sovrum
id: 25c78f6df30f4ccaadf90a5a38c113a8
- id: 31d8157fa2424e7d9b7b1a029ae6e8e0
alias: Turn on bedroom lights in the morning if before sunrise
trigger:
- platform: time
at: 06:45:00
- platform: state
entity_id: input_boolean.morning_mode
to: 'on'
condition:
- condition: and
conditions:
- condition: sun
before: sunrise
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.fonster_lampor_barn_rum
- group.fonster_lampor_sovrum
area_id: selmas_rum
- id: 0c912f631cb54be18390f9886f3dc0d1
alias: Turn on lights in the morning if before sunrise
trigger:
- at: 06:30:00
platform: time
condition:
- condition: and
conditions:
- before: sunrise
condition: sun
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.fonster_lampor
- light.outdoor_lights_zha_group_0x0004
mode: single
- id: '1563627826205'
alias: Shut Down Octopi when Print Complete
trigger:
- entity_id: sensor.octoprint_job_percentage
platform: state
to: '100.0'
condition: []
action:
- service: script.shutdown_octoprint
- id: '1580318781531'
alias: Notify me when the lights become unavailable
description: Notify me when the lights become unavailable
trigger:
- platform: template
value_template: '{{ states.light | rejectattr(''state'', ''in'', [''on'', ''off''])
| list | length > 0 }}
'
condition: []
action:
- data_template:
message: '{% set data = namespace(ignore_list=[]) %} {% for light in states.light
%} {% set matched = light | regex_search(''zha_group_0x0'', ignorecase=False)
%} {% if matched %} {% set tmp = light.attributes[''friendly_name'']%} {%
set data.ignore_list = data.ignore_list + [tmp] %} {% endif %} {% endfor %}
Unavailable light detected: {{ states.light | rejectattr(''name'',''in'',
data.ignore_list) | rejectattr(''state'',''in'', [''on'', ''off'']) | map(attribute=''name'')
| list | join(''
'')}} '
service: notify.mobile_app_kim_alster_glimberg
mode: single
- id: '1585489737608'
alias: Receive Blue Connect Meassurements
description: Receive data from Blue Connect via IFTTT webhook
trigger:
- platform: webhook
webhook_id: 7D3BC3BE-5337-4A06-B7F7-048B0F235F5B
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.pool_temperature
value: '{{trigger.json.temperature | float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.pool_ph
value: '{{trigger.json.ph | float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.pool_orp
value: '{{trigger.json.orp | float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.pool_salinity
value: '{{trigger.json.salinity | float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.pool_conductivity
value: '{{trigger.json.conductivity | float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.pool_analyzed_at
value: '{{as_timestamp(strptime(trigger.json.analyzedAt,"%B %d, %Y at %I:%M%p",0),0)
| float}}'
- service: input_number.set_value
data_template:
entity_id: input_number.blue_connect_time_delay
value: '{{(as_timestamp(utcnow()) - as_timestamp(strptime(trigger.json.analyzedAt,"%B
%d, %Y at %I:%M%p",0),0))/60| int}}'
- id: '1587933664663'
alias: Turn on window lights at sunset
description: ''
trigger:
- event: sunset
offset: -00:45:00
platform: sun
condition: []
action:
- data: {}
entity_id: switch.nedre_belysning
service: homeassistant.turn_on
- data: {}
service: homeassistant.turn_on
target:
entity_id: light.outdoor_lights_zha_group_0x0004
area_id: selmas_rum
- brightness_pct: 43
device_id: 3a0ef9aaf6834e0aaf02d39b08256b21
domain: light
entity_id: light.ikea_of_sweden_tradfri_bulb_e27_ws_opal_980lm_e16c15fe_level_light_color_on_off
type: turn_on
- type: turn_on
device_id: bd5d8edfde5248c681cfb41edbaeb8a0
entity_id: light.tv_lampa_d54435fe_level_on_off
domain: light
brightness_pct: 43
- brightness_pct: 43
device_id: f7ed1b67e0bf4a07b718da9bd85fbc7b
domain: light
entity_id: light.ikea_of_sweden_tradfri_bulb_e14_ws_470lm_5b2f9ffe_level_light_color_on_off
type: turn_on
mode: single
- id: 1585489737608wwww
alias: Receive successful build
description: Receive successful build from Github Actions
trigger:
- platform: webhook
webhook_id: 2F548886-D37B-45F6-BC25-E0EF57167741
action:
- service: hassio.addon_restart
data:
addon: core_git_pull
- delay: 0:01
- service: homeassistant.restart
mode: single
- id: 1585489737608cxxx
alias: Config changed listener
description: Watching for changed files in config folder
trigger:
- platform: event
event_type: folder_watcher
event_data:
event_type: created
- platform: event
event_type: folder_watcher
event_data:
event_type: deleted
- platform: event
event_type: folder_watcher
event_data:
event_type: modified
- platform: event
event_type: folder_watcher
event_data:
event_type: moved
action:
- service: shell_command.commit_config
mode: single
- id: '1642445204462'
alias: Refresh Let's Encrypt Certs
description: ''
trigger:
- platform: time
at: 01:00
condition: []
action:
- service: hassio.addon_start
data:
addon: core_letsencrypt
mode: single
- id: '1642538502984'
alias: Purge Database
description: ''
trigger:
- platform: time
at: 03:00
condition: []
action:
- service: recorder.purge
data:
keep_days: 90
mode: single
- id: '1665325244287'
alias: Arm Cameras when door is locked
description: ''
trigger:
- platform: state
entity_id:
- lock.hoveddor
to: locked
condition: []
action:
- service: aarlo.alarm_set_mode
data:
entity_id: alarm_control_panel.aarlo_backyard_east,alarm_control_panel.aarlo_backyard_west,alarm_control_panel.aarlo_parking,alarm_control_panel.aarlo_garage
mode: armed
mode: single
- id: '1665325636538'
alias: Unarm Cameras when door is unlocked
description: ''
trigger:
- platform: state
entity_id:
- lock.hoveddor
to: unlocked
condition: []
action:
- service: aarlo.alarm_set_mode
data:
entity_id: alarm_control_panel.aarlo_backyard_east,alarm_control_panel.aarlo_backyard_west,alarm_control_panel.aarlo_parking,alarm_control_panel.aarlo_garage
mode: disarmed
mode: single
- id: '1665342120821'
alias: Turn off standby when nobody is home
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.verisure_alarm
to: armed_away
- platform: time
at: 00:00:00
condition: []
action:
- service: media_player.media_stop
data: {}
target:
device_id:
- c443a46b830cd7c583cc7bf2b2f2c5cc
- bee2a2e4235c7788a7a601e39afd8911
- service: homeassistant.turn_off
data: {}
target:
device_id:
- 5fd1e95ccbe3503b4e31c6f70ce48cd7
- 917009acf78247d5a114c2c5df5b13c0
- b7a60658b7b24ba89ef9caa8f1cd1a63
- a27c373690694d5f90a96dbb2e4380aa
mode: single
- id: '1665342520725'
alias: Enable Stand by whenever someone is home
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.verisure_alarm
to: disarmed
- platform: time
at: 07:00:00
condition: []
action:
- service: homeassistant.turn_on
data: {}
target:
device_id:
- b7a60658b7b24ba89ef9caa8f1cd1a63
- 917009acf78247d5a114c2c5df5b13c0
- 5fd1e95ccbe3503b4e31c6f70ce48cd7
- a27c373690694d5f90a96dbb2e4380aa
mode: single