-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
505 lines (505 loc) · 13 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
- id: '1700856617441'
alias: Dinner Time
description: ''
trigger:
- platform: state
entity_id:
- input_button.dinner_time
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.den
data:
media_content_id: media-source://tts/tts.piper?message=Boys%2C+it+is+time+to+eat+dinner.+Please+wash+hands+and+get+in+your+seats.&language=en_GB&voice=en_GB-alan-low
media_content_type: provider
metadata:
title: Boys, it is time to eat dinner. Please wash hands and get in your seats.
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/tts.piper?message=Boys%2C+it+is+time+to+eat+dinner.+Please+wash+hands+and+get+in+your+seats.&language=en_GB&voice=en_GB-alan-low
mode: single
- id: '1700861564074'
alias: Lunch Time
description: ''
trigger:
- platform: state
entity_id:
- input_button.lunch_time
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.den
data:
media_content_id: media-source://tts/tts.piper?message=Boys%2C+it+is+lunch+time.+Lunch%2C+lunch%2C+lunch.+Munch%2C+munch%2C+munch.+Please+take+your+seats.&language=en_GB&voice=en_GB-alan-low
media_content_type: provider
metadata:
title: Boys, it is lunch time. Lunch, lunch, lunch. Munch, munch, munch. Please
take your seats.
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/tts.piper?message=Boys%2C+it+is+lunch+time.+Lunch%2C+lunch%2C+lunch.+Munch%2C+munch%2C+munch.+Please+take+your+seats.&language=en_GB&voice=en_GB-alan-low
mode: single
- id: '1700862077439'
alias: Say Something button
description: ''
trigger:
- platform: state
entity_id:
- input_button.say_something
condition: []
variables:
message: “{{ states('input_text.say_something_tts') }}”
action:
- service: media_player.play_media
target:
entity_id: media_player.den
data:
media_content_id: media-source://tts/tts.piper?message={{ message }}&language=en_US&voice=en_GB-alan-medium
media_content_type: provider
metadata:
title: '{{ message }}'
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/tts.piper?message={{ message }}&language=en_US&voice=en_US-joe-medium
mode: single
- id: '1700881498738'
alias: Daily system backup
description: ''
trigger:
- platform: time
at: 03:00:00
condition: []
action:
- service: hassio.backup_full
data:
compressed: true
homeassistant_exclude_database: false
mode: single
- id: '1700883243845'
alias: Brush Teeth announcement
description: ''
trigger:
- platform: time
at: '19:05:00'
action:
- service: tts.speak
entity_id: tts.piper
data:
media_player_entity_id: media_player.den
message: '{{ message[0] }}'
options:
voice: '{{ message[1] }}'
variables:
message: '{{ [ [''请注意。你应该去刷牙。'', ''zh_CN-huayan-medium''], [''男孩们,你需要去刷牙。马上!'',
''zh_CN-huayan-medium''], [''10 位牙医中有 10 位建议刷牙和使用牙线。现在是你刷牙的时候了!'', ''zh_CN-huayan-medium''], [''Boys,
it is time to brush teeth. Please get to it.'', ''en_GB-alan-low''], [''It
is time to brush your teeth. You dont want to have bad breath, do you?'',''en_GB-alan-low''
], [''Boys, please stop what you are doing and go brush your teeth now. Thank
you.'', ''en_GB-alan-low'' ] ] | random }}'
mode: single
- id: '1700883243846'
alias: Breakfast chatter
description: ''
variables:
message: '{{ [ [''早上好!妈妈早餐煮豆浆和油条了吗?'', ''zh_CN-huayan-medium''], [''我希望你吃了早餐。保持良好的营养很重要!'',
''zh_CN-huayan-medium''], [''你的早餐怎么样?你有没有粽子?你应该在某个时候尝试一下。'', ''zh_CN-huayan-medium''],
[''I hope you enjoyed your breakfast this morning. You will need energy to get
through your day!'', ''en_GB-alan-low'' ], [''Did you have bacon and potato
cakes this morning, or was it oatmeal and yogurt? Either way, it smells delicious.'',
''en_GB-alan-low'' ], [''Does anyone need more coffee? I can top your cup off.'',
''en_GB-alan-low'' ] ] | random }}'
trigger:
- platform: time
at: 07:45:00
action:
- service: tts.speak
entity_id: tts.piper
data:
media_player_entity_id: media_player.den
message: '{{ message[0] }}'
options:
voice: '{{ message[1] }}'
mode: single
- id: '1702088969429'
alias: Light Christmas tree
description: ''
triggers:
- at: 06:30:00
trigger: time
conditions: []
actions:
- data: {}
target:
entity_id: switch.mini_smart_plug_2
action: switch.turn_on
mode: single
- id: '1702089067349'
alias: Unlight Christmas Tree
description: ''
trigger:
- platform: time
at: '22:00:00'
condition: []
action:
- service: switch.turn_off
target:
entity_id:
- switch.mini_smart_plug_2
device_id: []
area_id: []
data: {}
mode: single
- id: '1702224462032'
alias: Porch light on motion when its dark
description: ''
use_blueprint:
path: homeassistant/motion_light_afterdark.yaml
input:
motion_entity: binary_sensor.lot125_doorbell_motion
light_target:
entity_id: light.s2_on_off_switch
- id: '1702247760903'
alias: Flood Lights on motion after dark
description: ''
use_blueprint:
path: homeassistant/motion_light_afterdark.yaml
input:
motion_entity: binary_sensor.lot125_front_door_approach_motion
light_target:
entity_id: light.s2_on_off_switch_2
- id: '1702256700939'
alias: Desk Lamp Random Colors
description: Light show
trigger:
- hours: '*'
minutes: '*'
platform: time_pattern
seconds: /1
condition: []
action:
- service: script.rainbow_light
data:
entity: light.3_bulb_desk_lamp
mode: single
- id: '1702864289885'
alias: Office Lights at night
description: ''
use_blueprint:
path: homeassistant/motion_light_afterdark.yaml
input:
motion_entity: binary_sensor.multisensor_6_motion_detection
light_target:
entity_id: light.mini_smart_plug
- id: '1702871902204'
alias: Turn fan on at 10:15pm
description: ''
trigger:
- platform: time
at: '22:15:00'
condition: []
action:
- service: fan.turn_on
target:
device_id: 9252f67513053e4bb4e203f0e8e70ed8
data:
percentage: 100
mode: single
- id: '1702871970484'
alias: Turn fan off at 6:25am
description: ''
trigger:
- platform: time
at: 06:25:00
condition: []
action:
- service: fan.turn_off
target:
device_id: 9252f67513053e4bb4e203f0e8e70ed8
data: {}
mode: single
- id: '1703883080821'
alias: Notify of open garage
description: ''
mode: restart
trigger:
- platform: state
entity_id:
- cover.ratgdo_65441_door
for:
hours: 1
minutes: 0
seconds: 0
to: open
condition: []
action:
- alias: Set up variables
variables:
action_close: ' {{ ''CLOSE_'' ~ context.id }}'
- alias: Notify mobile devices
service: notify.mobile_devices
data:
message: 'WARNING: Garage door has been open for one hour. Close it?'
data:
actions:
- action: '{{ action_close }}'
title: Close garage
- action: IGNORE
title: Ignore
- alias: Wait for response
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_close }}'
- alias: Perform the action
choose:
- conditions: '{{ wait.trigger.event.data.action == action_close }}'
sequence:
- service: cover.close_cover
target:
entity_id: cover.ratgdo_65441_door
- id: '1703977319860'
alias: Office bathroom vanity light on with motion
description: ''
use_blueprint:
path: homeassistant/motion_light.yaml
input:
motion_entity: binary_sensor.multisensor_6_motion_detection_2
light_target:
entity_id: light.s2_on_off_switch_3
no_motion_wait: 15
- &id001
id: '1704136086849'
alias: Count vehicles
description: ''
trigger:
- platform: mqtt
topic: BlueIris/Driveway/Alert
condition:
- condition: or
conditions:
- condition: template
value_template: '{{ "car" in trigger.payload_json.object }}'
- condition: template
value_template: '{{ "truck" in trigger.payload_json.object }}'
action:
- service: counter.increment
target:
entity_id: counter.car_count
data: {}
mode: single
- *id001
- id: '1704144178612'
alias: Count people
description: ''
trigger:
- platform: mqtt
topic: BlueIris/Driveway/Alert
condition:
- condition: or
conditions:
- condition: template
value_template: '{{ "person" in trigger.payload_json.object }}'
action:
- service: counter.increment
data: {}
target:
entity_id: counter.person_count
mode: single
- id: '1704205579064'
alias: Reset detection counters
description: ''
trigger:
- platform: time
at: 00:00:00
condition: []
action:
- service: counter.reset
target:
entity_id:
- counter.person_count
- counter.car_count
data: {}
mode: single
- id: '1704981942366'
alias: Garage Sconces off at 0600
description: ''
triggers:
- at: 06:00:00
trigger: time
conditions: []
actions:
- data: {}
target:
entity_id: light.above_garage_sconces
action: light.turn_off
mode: single
- id: '1704981996122'
alias: Garage Sconces on at sunset
description: ''
trigger:
- platform: sun
event: sunset
offset: 0
condition: []
action:
- service: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.above_garage_sconces
mode: single
- id: '1715569285577'
alias: AC down at night (REAR)
description: ''
trigger:
- platform: time
at: '22:00:00'
condition:
- condition: state
entity_id: climate.rear_tstat
attribute: temperature
state: '77'
action:
- service: climate.set_temperature
target:
device_id: e8c3226fd553a179fe041c55bff0a7d6
data:
temperature: 76
mode: single
- id: '1715569336285'
alias: AC up in morning (REAR)
description: ''
trigger:
- platform: time
at: 06:00:00
condition:
- condition: state
entity_id: climate.rear_tstat
attribute: temperature
state: '76'
action:
- service: climate.set_temperature
target:
device_id: e8c3226fd553a179fe041c55bff0a7d6
data:
temperature: 77
mode: single
- id: '1733104275076'
alias: Courtyard Fairy Lights on at sunset
description: ''
triggers:
- event: sunset
offset: 0
trigger: sun
conditions: []
actions:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.mini_smart_plug_4
mode: single
- id: '1733104324976'
alias: Courtyard Fairy Lights off at 0615
description: ''
triggers:
- at: 06:15:00
trigger: time
conditions: []
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.mini_smart_plug_4
mode: single
- id: '1733794166552'
alias: Activate Xmas lights
description: ''
triggers:
- trigger: sun
event: sunset
offset: 0
conditions: []
actions:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.outdoor_smart_plug
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.node_4_2
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.node_4
mode: single
- id: '1733797033214'
alias: Deactivate Xmas lights
description: ''
triggers:
- trigger: time
at: '21:00:00'
conditions: []
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.outdoor_smart_plug
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.node_4_2
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.node_4
mode: single