-
Notifications
You must be signed in to change notification settings - Fork 1
/
automations.yaml
540 lines (540 loc) · 13.5 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
- id: '1640522228516'
alias: Livingroom TV on - Shutter down
description: 'Closes the shutter to avoid reflections through the window while watching
TV. '
trigger:
- platform: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
above: '20'
condition: []
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 0
mode: single
- id: '1641237098329'
alias: All Shutter down on sunset
description: Close all shutters after sunset.
trigger:
- platform: sun
event: sunset
offset: +0:30
condition: []
action:
- service: cover.set_cover_position
data:
position: 0
target:
entity_id:
- cover.office_shutter
- cover.bedroom_shutter
- cover.livingroom_shutter_small
mode: single
- id: '1641237270223'
alias: Livingroom Shutter up (workdays)
description: Open the shutter in the living room when the TV is on, after sunrise
at workdays.
trigger:
- platform: sun
event: sunrise
offset: '+1'
condition:
- condition: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
below: 20
enabled: true
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 100
mode: single
- id: '1642241222443'
alias: 'HASS: Dropbox-Backup'
description: ''
trigger:
- platform: time
at: 03:00
condition: []
action:
- service: hassio.backup_full
data: {}
- service: hassio.addon_stdin
data:
addon: 782428ea_dropbox-backup
input:
command: upload
mode: single
- id: '1645221509073'
alias: 'HASS: GitHub-Backup (fixme)'
description: Pushes HASS config files to GitHub.
trigger:
- platform: time
at: 02:00
condition: []
action:
- service: hassio.addon_stdin
data:
addon: a0d7b954_ssh
input: /config/packages/gitpush/gitpush.sh
mode: single
- id: '1652179746791'
alias: Office Shutter up (workdays)
description: Open the shutter in the office on weekdays after sunrise or at an appropriate
time.
trigger:
- platform: sun
event: sunrise
offset: '+1'
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- device_id: 39df41eba2aa553cb9c0ee9ef0e713e5
domain: cover
entity_id: cover.office_shutter
type: set_position
position: 100
mode: single
- id: '1652424507352'
alias: All Stop/Off @ 01:00 (workdays)
description: Turns off all consumers and stops music playback at a specified time
on weekdays.
trigger:
- platform: time
at: 01:00:00
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: media_player.media_stop
data: {}
target:
device_id:
- b87286876b55c180c8dfc16316a35e7d
- 1553b70b046b6dd8fbeba4f0e8c0aeea
- 5e01f8a267780babcc5de58e7fcc77ac
- 972d524e912f3936491f7e6c8adf8ded
- 247f7122aa7a90ff13b8ba771073539e
- 6620ecddea86dec1ea7853bc633cc8a6
- service: light.turn_off
data: {}
target:
area_id:
- schlafzimmer
- wohnzimmer
- kuche
- balcony
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.kitchen_pc
- switch.kitchen_cookerhood
- switch.livingroom_fan
mode: single
- id: '1652978544840'
alias: 'HASS: Away'
description: ''
trigger:
- platform: state
entity_id:
- device_tracker.iphone_xs_2
from: home
to: not_home
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- service: media_player.media_stop
data: {}
target:
device_id:
- b87286876b55c180c8dfc16316a35e7d
- 1553b70b046b6dd8fbeba4f0e8c0aeea
- 5e01f8a267780babcc5de58e7fcc77ac
- 972d524e912f3936491f7e6c8adf8ded
- 247f7122aa7a90ff13b8ba771073539e
- 6620ecddea86dec1ea7853bc633cc8a6
- service: light.turn_off
data: {}
target:
entity_id:
- light.bedroom_light
- light.kitchen_light_group
- light.livingroom_floodlight
- light.livingroom_tv_light
- service: switch.turn_off
data: {}
target:
device_id:
- cbf6bb49e2823487b31dfdf305e033d8
- 1e9a16f4d3c307044b1aafaec641833b
- 0d509434e5813a91e01bf0330ab90f17
- 2963d98a0a5f3f18a618dbb4ff4339b5
- 48608a926e1e91846fb7ded6dafd2b0c
- service: vacuum.turn_on
data: {}
target:
entity_id: vacuum.livingroom_deebot
mode: single
- id: '1652986188792'
alias: 'HASS: At Home'
description: ''
trigger:
- platform: state
entity_id:
- device_tracker.iphone_xs_2
from: not_home
to: home
condition: []
action:
- type: turn_on
device_id: 0d509434e5813a91e01bf0330ab90f17
entity_id: switch.kitchen_cookerhood
domain: switch
enabled: false
- service: vacuum.return_to_base
data: {}
target:
entity_id: vacuum.livingroom_deebot
mode: single
- id: '1654138222259'
alias: Corridor Headphones Stop
description: Prevent the morning alarm clock from being accidentally overheard.
trigger:
- platform: time
at: 06:55:00
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
attribute: workdays
state: 'on'
action:
- service: media_player.media_stop
data: {}
target:
device_id: 5e01f8a267780babcc5de58e7fcc77ac
mode: single
- id: '1654439759794'
alias: Sonos Livingroom Sub Crossover (fixme)
description: ''
trigger:
- platform: state
entity_id:
- automation.sonos_livingroom_sub_crossover
condition: []
action:
- service: shell_command.sonos_livingroom_sub_crossover
data_template:
room: Livingroom
sub_crossover: '{{ trigger.to_state.state | int }}'
mode: single
- id: '1654695792819'
alias: Livingroom TV off - Shutter up
description: Opens the shutter when the TV is turned off one hour before sunset.
trigger:
- platform: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
below: '20'
for:
hours: 0
minutes: 0
seconds: 30
condition:
- condition: sun
before: sunset
before_offset: '-1'
after: sunrise
after_offset: '1'
- condition: numeric_state
entity_id: sensor.livingroom_pushbutton_temperature
below: '23'
enabled: true
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 100
mode: single
- id: '1657476087267'
alias: Livingroom PC off - TV off
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.livingroom_pc_power_consumption
for:
hours: 0
minutes: 1
seconds: 0
below: '7'
condition: []
action:
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.android_tv_livingroom
mode: single
- id: '1657477115931'
alias: Livingroom PC on - TV on
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.livingroom_pc_power_consumption
for:
hours: 0
minutes: 0
seconds: 0
above: 8
condition: []
action:
- service: wake_on_lan.send_magic_packet
data:
mac: 34:93:42:22:74:92
mode: single
- id: '1658865314989'
alias: Livingroom Sun Protection start (test)
description: Close the shutter when the sun shines into the window and the in-/outside
temperature is above a certain value, but only if the TV is off.
trigger:
- platform: state
entity_id:
- sun.sun
attribute: azimuth
from: '100'
to: '320'
enabled: false
- platform: numeric_state
entity_id: sun.sun
attribute: azimuth
above: 100
below: 320
condition:
- condition: numeric_state
entity_id: sensor.livingroom_thermostat_current_temperature
above: '23'
- condition: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
below: '20'
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 0
mode: single
- id: '1658865634343'
alias: Livingroom Sun Protection stop (fixme)
description: Close the shutter when the sun shines into the window and the in-/outside
temperature is above a certain value, but only if the TV is off.
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: azimuth
above: '325'
condition:
- condition: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
below: '20'
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 100
mode: single
- id: '1658866110736'
alias: Office Sun Protection start
description: Close the shutter when the sun shines into the window and the in-/outside
temperature is above a certain value.
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: azimuth
above: '75'
below: '150'
condition:
- condition: numeric_state
entity_id: climate.office_thermostat
attribute: current_temperature
above: '23'
action:
- service: script.office_shutter_favorite
data: {}
mode: single
- id: '1658866207783'
alias: Office Sun Protection stop
description: Close the shutter when the sun shines into the window and the in-/outside
temperature is above a certain value.
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: azimuth
above: '160'
condition:
- condition: numeric_state
entity_id: sensor.office_thermostat_current_temperature
below: '24'
action:
- device_id: 39df41eba2aa553cb9c0ee9ef0e713e5
domain: cover
entity_id: cover.office_shutter
type: set_position
position: 100
mode: single
- id: '1659015695693'
alias: All Stop/Off @ 02:00 (weekend)
description: Turns off all consumers and stops music playback at a set time on weekends.
trigger:
- platform: time
at: 02:00:00
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
action:
- service: media_player.media_stop
data: {}
target:
device_id:
- b87286876b55c180c8dfc16316a35e7d
- 1553b70b046b6dd8fbeba4f0e8c0aeea
- 5e01f8a267780babcc5de58e7fcc77ac
- 972d524e912f3936491f7e6c8adf8ded
- 247f7122aa7a90ff13b8ba771073539e
- 6620ecddea86dec1ea7853bc633cc8a6
- service: light.turn_off
data: {}
target:
area_id:
- schlafzimmer
- wohnzimmer
- kuche
- balcony
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.kitchen_pc
- switch.kitchen_cookerhood
- switch.livingroom_fan
mode: single
- id: '1660664658456'
alias: Heatingroom Pump on (workdays)
description: ''
trigger:
- platform: time
at: 06:59:00
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
attribute: workdays
state: 'on'
action:
- type: turn_on
device_id: 1e9a16f4d3c307044b1aafaec641833b
entity_id: switch.heatingroom_pump
domain: switch
mode: single
- id: '1660664766395'
alias: Heatingroom Pump off (always)
description: ''
trigger:
- platform: time
at: 07:00:00
condition: []
action:
- type: turn_off
device_id: 1e9a16f4d3c307044b1aafaec641833b
entity_id: switch.heatingroom_pump
domain: switch
mode: single
- id: '1664445539990'
alias: Bedroom Shutter up (workdays)
description: Open the shutter in the bedroom on workdays at the appropriate time.
trigger:
- platform: sun
event: sunrise
offset: '+1'
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: time
after: 00:07:00
action:
- device_id: cc7215817ef8193b2df878dad98cb347
domain: cover
entity_id: cover.bedroom_shutter
type: set_position
position: 100
mode: single
- id: '1669050675528'
alias: Livingroom Shutter up (weekend)
description: Open the shutter in the living room when the TV is on, at a appropriate
time at weekends.
trigger:
- platform: time
at: 08:00:00
enabled: true
condition:
- condition: numeric_state
entity_id: sensor.livingroom_tv_power_consumption
below: 20
enabled: true
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
action:
- device_id: e8a0c9ad01d33eee439d3e9cbf6bbbf5
domain: cover
entity_id: cover.livingroom_shutter_small
type: set_position
position: 100
mode: single
- id: '1669051183968'
alias: Office Shutter up (weekends)
description: Open the shutter in the office when at a appropriate time at weekends.
trigger:
- platform: time
at: 08:00:00
enabled: true
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
action:
- device_id: 45493951566974c8f1c11c836ba797b8
domain: cover
entity_id: cover.office_shutter
type: set_position
position: 100
mode: single
- id: '1670141905775'
alias: Bedroom Shutter up (weekend)
description: Open the shutter in the bedroom on weekends at the appropriate time.
trigger:
- platform: time
at: 09:00:00
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
action:
- device_id: cc7215817ef8193b2df878dad98cb347
domain: cover
entity_id: cover.bedroom_shutter
type: set_position
position: 100
mode: single