-
Notifications
You must be signed in to change notification settings - Fork 2
/
automations.yaml
470 lines (469 loc) · 12.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
- id: '1618087302165'
alias: Living Room TV - Set to Soundbar
description: ''
trigger:
- platform: state
entity_id: media_player.living_room_tv
attribute: sound_output
for: 0:00:30
- platform: state
entity_id: media_player.living_room_tv
to: 'on'
condition:
condition: not
conditions:
- condition: state
entity_id: media_player.living_room_tv
state: bt_soundbar
attribute: sound_output
action:
- service: webostv.select_sound_output
data:
entity_id: media_player.living_room_tv
sound_output: external_arc
mode: single
- id: '1618094589663'
alias: "\U0001F6E0 Startup Notification"
trigger:
- platform: homeassistant
event: start
action:
- service: notify.dans_devices
data:
message: "Home Assistant back online! \U0001F389\n"
mode: single
- id: '1618094617818'
alias: "\U0001F6E0 Shutdown Notification"
trigger:
- platform: homeassistant
event: shutdown
action:
- service: notify.dans_devices
data:
message: "Home Assistant is going down! \U0001F44B\n"
mode: single
- id: '1625482356250'
alias: Away Mode - Presence Simulation
description: ''
trigger:
- platform: state
entity_id:
- sensor.replay_bedroom
- sensor.replay_dressing_room
- sensor.replay_bedroom_ensuite
- sensor.replay_garden
- sensor.replay_guest_ensuite
- sensor.replay_entrance_hall
- sensor.replay_living_room
condition:
- condition: state
entity_id: input_boolean.away_mode
state: 'on'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ is_state("sun.sun", "below_horizon") }}'
- condition: template
value_template: '{{ trigger.to_state == "on" }} '
sequence:
- service: hue.hue_activate_scene
data:
group_name: '{{ trigger.entity_id.replace("sensor.replay_","light.") }}'
scene_name: '{{ states.sensor.day_phase.state }}'
default:
- service: light.turn_off
data:
entity_id: '{{ trigger.entity_id.replace("sensor.replay_","light.") }}'
mode: single
- id: '1628502137509'
alias: "\U0001F3E0 Sleep Mode On"
description: ''
trigger:
- platform: time
at: '22:00'
condition: []
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.sleep_mode
data: {}
mode: single
- id: '1658090323476'
alias: "\U0001F6E0 Run Watchman"
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: watchman.report
data: {}
mode: single
- id: '1676996174224'
alias: "\U0001F697 Manage Intelligent Charging"
description: ''
trigger:
- type: plugged_in
platform: device
device_id: cbc82858929f108b40302fcc67bcc77d
entity_id: binary_sensor.tesla_charger
domain: binary_sensor
condition:
- condition: zone
entity_id: device_tracker.tesla_location_tracker
zone: zone.home
action:
- if:
- condition: template
value_template: '{{ (now() - strptime(states.sensor.tesla_full_battery.state,
''%Y-%m-%d %H:%M:%S.%f%z'')).days >= 14 }}'
then:
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id: automation.tesla_intelligent_charging
- service: number.set_value
data:
value: '16'
target:
entity_id: number.tesla_charging_amps
- service: number.set_value
data:
value: '100'
target:
entity_id: number.tesla_charge_limit
else:
- service: automation.turn_on
data: {}
target:
entity_id: automation.tesla_intelligent_charging
mode: single
- id: '1676999116232'
alias: "\U0001F419 Home Only Smart Charging"
description: ''
trigger:
- platform: state
entity_id:
- device_tracker.tesla_location_tracker
condition:
- condition: not
conditions:
- condition: or
conditions:
- condition: state
entity_id: device_tracker.tesla_location_tracker
state: unavailable
- condition: state
entity_id: device_tracker.tesla_location_tracker
state: unknown
alias: State Unknown
alias: Not State Unknown
action:
- if:
- condition: zone
entity_id: device_tracker.tesla_location_tracker
zone: zone.home
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.octopus_smart_charging
else:
- service: switch.turn_off
data: {}
target:
entity_id: switch.octopus_smart_charging
mode: single
- id: '1677146988940'
alias: "\U0001F419 Dehumidify Off Peak"
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.octopus_intelligent_slot
- platform: time_pattern
minutes: '5'
condition: []
action:
- if:
- condition: state
entity_id: binary_sensor.octopus_intelligent_slot
state: 'on'
then:
- type: turn_on
device_id: 8cee0df6b6a02ba0be61b4e9058c7449
entity_id: switch.dehumidifier
domain: switch
else:
- type: turn_off
device_id: 8cee0df6b6a02ba0be61b4e9058c7449
entity_id: switch.dehumidifier
domain: switch
mode: single
- id: '1678816456729'
alias: "\U0001F4A1 Bathroom"
description: ''
use_blueprint:
path: motion_dayphase.yaml
input:
motion_entity: binary_sensor.bathroom_sensor_motion
light_target:
entity_id: light.bathroom
- id: '1679074324706'
alias: "\U0001F518 Playroom Button"
description: ''
trigger:
- device_id: a526c8841f0ddce4f0aa71ba6f81dbb7
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
- device_id: a526c8841f0ddce4f0aa71ba6f81dbb7
domain: zha
platform: device
type: remote_button_long_release
subtype: dim_up
action:
- if:
- condition: template
value_template: "{{ (states.counter.playroom_button_counter.state | int) > states.scene
\n | map(attribute=\"entity_id\")\n | select(\"match\", \".*playroom.*\")\n
| list | length - 1\n}}\n"
then:
- service: counter.reset
data: {}
target:
entity_id: counter.playroom_button_counter
else:
- service: counter.increment
data: {}
target:
entity_id: counter.playroom_button_counter
- service: hue.activate_scene
data: {}
target:
entity_id: "{{ (states.scene \n | map(attribute=\"entity_id\")\n | select(\"match\",
\".*playroom.*\")\n | list)[(states.counter.playroom_button_counter.state
| int) | int] }}\n"
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: hue.activate_scene
data:
transition: 30
target:
entity_id: '{{ "scene.playroom_" ~ states.sensor.day_phase.state }}
'
mode: restart
- id: '1680104208576'
alias: "\U0001F697 Tesla Intelligent Charging"
description: ''
use_blueprint:
path: tesla_intelligent_charging.yaml
input:
limit_low: 70
- id: '1680270439426'
alias: "\U0001F419 Dishwasher Autostart"
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.013030526524018532_bsh_common_status_doorstate
from: 'on'
to: 'off'
- platform: state
entity_id:
- binary_sensor.octopus_intelligent_slot
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.013030526524018532_bsh_common_status_doorstate
state: 'off'
- condition: state
entity_id: binary_sensor.013030526524018532_bsh_common_status_remotecontrolstartallowed
state: 'on'
- condition: state
entity_id: binary_sensor.octopus_intelligent_slot_next_3_hours
state: 'on'
action:
- service: button.press
data: {}
target:
entity_id: button.013030526524018532_start_pause
mode: single
- id: '1682784582585'
alias: "\U0001F4A1 Toilet"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.day_phase
motion_sensor: binary_sensor.hue_motion_sensor_1_motion_2
hue_group: light.toilet
pre_motion_sensor: binary_sensor.entrance_hall_sensor_motion
no_motion_wait: 2
- id: '1682869286884'
alias: "\U0001F4A1 Playroom"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.day_phase
motion_sensor: binary_sensor.hue_motion_sensor_1_motion
hue_group: light.playroom
pre_motion_sensor: binary_sensor.entrance_hall_sensor_motion
illuminance_sensor: sensor.hue_motion_sensor_1_illuminance
- id: '1682882397419'
alias: "\U0001F4A1 Kitchen"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.day_phase
motion_sensor: binary_sensor.kitchen_composite_motion
hue_group: light.kitchen
no_motion_wait: 10
pre_motion_sensor: binary_sensor.entrance_hall_sensor_motion
- id: '1682882582736'
alias: "\U0001F4A1 Bathroom"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
motion_sensor: binary_sensor.bathroom_sensor_motion
pre_motion_sensor: binary_sensor.top_floor_landing_sensor_motion
hue_group: light.bathroom
- id: '1683131674250'
alias: "\U0001F4A1 Top Floor Landing"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
motion_sensor: binary_sensor.top_floor_landing_sensor_motion
hue_group: light.top_floor_landing
pre_motion_sensor: binary_sensor.first_floor_landing_sensor_motion
off_duration: 5
- id: '1683146129107'
alias: "\U0001F4A1 Living Room"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.day_phase
hue_group: light.living_room
motion_sensor: binary_sensor.living_room_sensor_motion
pre_motion_sensor: binary_sensor.first_floor_landing_sensor_motion
no_motion_wait: 15
- id: '1683448384347'
alias: "\U0001F4A1 Guest Ensuite"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.day_phase
hue_group: light.guest_room_ensuite
- id: '1683463835179'
alias: "\U0001FAAB Roam Battery"
description: ''
trigger:
- platform: state
entity_id:
- sensor.sonos_roam_battery
condition:
- condition: state
entity_id: sensor.sonos_roam_battery
state: '20'
- condition: state
entity_id: sensor.sonos_roam_battery
state: '10'
action:
- service: notify.phones
data:
message: "Sonos Roam battery is {{ states.sensor.sonos_roam_battery.state }}%
\U0001FAAB\n"
mode: single
- id: '1683464466681'
alias: "\U0001F4A1 Bedroom Ensuite"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
hue_group: light.bedroom_ensuite
- id: '1684426956639'
alias: "\U0001F4A1 Harrison’s Room"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
hue_group: light.den
off_duration: 10
transition_duration: 60
- id: '1685456564351'
alias: "\U0001F4A1 Bedroom"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
hue_group: light.bedroom
- id: '1685457118799'
alias: "\U0001F518 Bedroom Lights On/Off"
description: ''
trigger:
- device_id: 4419b2f4dd290d63dbf4e81500d99ecf
domain: hue
platform: device
type: short_release
subtype: 1
unique_id: c95b29ea-bc1e-491b-9957-e0d8c11cd7b7
condition: []
action:
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.bedroom
- if:
- condition: state
entity_id: light.bedroom
state: 'off'
then:
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.bedroom
else:
- service: light.turn_off
data: {}
target:
entity_id: light.bedroom
mode: single
- id: '1685724752054'
alias: "\U0001F4A1 Dressing Room"
description: ''
use_blueprint:
path: automatic_hue_scene.yaml
input:
scene_sensor: sensor.top_floor_scene
hue_group: light.dressing_room
no_motion_wait: 15
pre_motion_illuminance_threshold: 1000
- id: '1686061107325'
alias: Test
description: ''
trigger: []
condition: []
action:
- service: script.brown_noise_on_roam
data: {}
mode: single