-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
543 lines (542 loc) · 14.1 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
- id: '1632684359102'
alias: Arlo - Bureau - Alerte nuit
description: ''
trigger:
- platform: state
entity_id: binary_sensor.aarlo_sound_arlobabychambre
from: 'off'
to: 'on'
condition: []
action:
- service: notify.mobile_app_iphone_de_cedric
data: {}
mode: single
- id: '1634820820101'
alias: ZHA - IKEA Remote - Bureau
description: ''
use_blueprint:
path: EPMatt/ikea_e1524_e1810.yaml
input:
integration: ZHA
controller_device: 1e0f52eb8b35ca5138713aa8e073350b
helper_last_controller_event: input_text.ikea_remote_last_event_bureau
button_up_long_loop: true
action_button_up_long:
- service: light.turn_on
target:
device_id: 7ca83e72d75d4366abf666b99ccb0405
data:
brightness_step_pct: 10
action_button_up_short:
- service: light.turn_on
data:
brightness_step_pct: 10
target:
device_id: 7ca83e72d75d4366abf666b99ccb0405
button_up_long_max_loop_repeats: 1000
button_down_long_loop: true
button_down_long_max_loop_repeats: 1000
action_button_down_short:
- service: light.turn_on
target:
device_id: 7ca83e72d75d4366abf666b99ccb0405
data:
brightness_step_pct: -10
action_button_down_long:
- service: light.turn_on
target:
device_id: 7ca83e72d75d4366abf666b99ccb0405
data:
brightness_step_pct: -10
action_button_center_short:
- service: light.turn_on
target:
device_id:
- 7ca83e72d75d4366abf666b99ccb0405
- f54e4836114f11eb94ebc1d1fdff2d6c
- fb401804114f11eb8ea983eb3f8ce2fd
- 934ea2ead7539073d847d8de6bd8722f
data:
brightness_pct: 1
button_center_double_press: true
action_button_center_double:
- service: light.turn_off
target:
area_id: 60dac2477ae84e129616a6bd60986247
data: {}
button_left_double_press: true
action_button_left_short:
- service: media_player.media_play_pause
target:
entity_id: media_player.arlobabychambre
data: {}
button_down_double_press: true
action_button_down_double:
- service: light.turn_off
data: {}
target:
device_id: 7ca83e72d75d4366abf666b99ccb0405
action_button_left_double:
- service: tts.google_translate_say
data:
entity_id: media_player.bureau
message: Good night !
action_button_right_short:
- service: hue.activate_scene
data: {}
target:
entity_id: scene.bureau_lecture_2
action_button_right_double:
- service: hue.activate_scene
data: {}
target:
entity_id: scene.bureau_concentration_2
action_button_right_long:
- service: hue.activate_scene
data: {}
target:
entity_id: scene.bureau_coucher_sur_la_savane
button_right_double_press: true
- id: '1649443754137'
alias: Watchdog - Lights Night
description: ''
trigger:
- platform: device
type: turned_on
device_id: 934ea2ead7539073d847d8de6bd8722f
entity_id: light.porte
domain: light
condition:
- condition: state
entity_id: input_boolean.mode_night
state: 'on'
action:
- service: light.turn_off
data: {}
target:
device_id: 934ea2ead7539073d847d8de6bd8722f
mode: single
- id: aarlo_snapshot
alias: Arlo - Snapshot toutes les 2h
trigger:
- platform: time_pattern
hours: /2
condition:
- condition: time
after: 07:30:00
before: '23:00:00'
action:
- service: aarlo.camera_request_snapshot
data:
entity_id: camera.aarlo_arlobaby
- id: aarlo_arm
alias: Arlo - Arme la nuit et absent
trigger:
platform: state
entity_id: input_boolean.mode_away, input_boolean.mode_holiday, input_boolean.mode_night
to: 'on'
action:
- service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.aarlo_arlobaby
- id: aarlo_disarm
alias: Arlo - Désarme quand présent
trigger:
platform: state
entity_id: input_boolean.mode_home
to: 'on'
action:
- service: alarm_control_panel.alarm_disarm
data:
entity_id: alarm_control_panel.aarlo_arlobaby
- id: zoe_notification_demarrage_charge
alias: Zoe - Notification demarrage charge
trigger:
- platform: state
entity_id: binary_sensor.zoe_charging
from: 'off'
to: 'on'
action:
- service: notify.mobile_app_iphone_de_cedric
data_template:
title: Zoe début de charge
message: "\U0001F697 Charge commencée à {{ states.sensor.zoe_battery_level.state_with_unit
}} le {{ as_timestamp(states('sensor.zoe_battery_last_activity')) | timestamp_custom('%d/%m/%Y
à %H:%M') }}."
- id: zoe_notification_arret_charge
alias: Zoe - Notification arrêt charge
trigger:
- platform: state
entity_id: binary_sensor.zoe_charging
from: 'on'
to: 'off'
action:
- service: notify.mobile_app_iphone_de_cedric
data_template:
title: Zoe fin de charge
message: "\U0001F697 Charge terminée à {{ states.sensor.zoe_battery_level.state_with_unit
}} le {{ as_timestamp(states('sensor.zoe_battery_last_activity')) | timestamp_custom('%d/%m/%Y
à %H:%M') }}."
- alias: SSL - Timestamp certificat expire
id: ssl_certificat_expire
trigger:
- platform: time
at: 03:00:00
condition:
- condition: numeric_state
entity_id: sensor.cert_expiry
below: 10
action:
- service: hassio.addon_restart
data:
addon: core_nginx_proxy
- service: persistent_notification.create
data:
message: NGinx proxy redemarré pour activer le nouveau certificat.
- alias: Xbox - Allumer lumières
id: xbox_allumer_lumieres
mode: single
trigger:
- platform: state
entity_id: media_player.xboxone_x
from: 'off'
to: 'on'
condition:
- condition: time
after: 08:00
before: '23:00'
- condition: state
entity_id: input_boolean.mode_home
state: 'on'
action:
- service: scene.turn_on
target:
entity_id: scene.xbox_allumer
- alias: HA Mode set
id: mode_set
trigger:
platform: state
entity_id: input_boolean.mode_home, input_boolean.mode_away, input_boolean.mode_holiday,
input_boolean.mode_night
to: 'on'
action:
- service: input_boolean.turn_off
data_template:
entity_id: '{% set booleans = [ ''input_boolean.mode_home'', ''input_boolean.mode_away'',
''input_boolean.mode_holiday'', ''input_boolean.mode_night'' ] | reject(''equalto'',
trigger.entity_id) %} {{ booleans | list | join('', '') }}
'
- id: poubelles_notifications
alias: Poubelles - Notifications
trigger:
- platform: time
at: '18:00:00'
- platform: time
at: '19:00:00'
- platform: time
at: '20:00:00'
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.notify_poubelles
state: 'on'
- condition: numeric_state
entity_id: sensor.poubelles
attribute: days
below: '2'
action:
- service: notify.mobile_app_iphone_de_cedric
data:
title: Sortir les poubelles !
message: Ramassage des poubelles demain.
data:
actions:
- action: SILENCE_TRASH_ALARM
title: C'est fait !
- alias: Poubelles - Désactiver rappel
id: poubelles_desactiver_rappel
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: SILENCE_TRASH_ALARM
action:
- service: input_boolean.turn_off
entity_id: input_boolean.notify_poubelles
- id: poubelles_activer_rappel
alias: Poubelles - Activer rappel
trigger:
- platform: state
entity_id: sensor.poubelles
attribute: days
from: '0'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.notify_poubelles
- id: appliance_machine_laver_terminee
alias: Appliance - Machine à laver terminée
trigger:
- platform: state
entity_id: binary_sensor.washing_machine
not_from:
- unavailable
- unknown
to: 'off'
action:
- service: notify.mobile_app_iphone_de_cedric
data_template:
title: Machine à laver terminée !
message: La machine à laver a terminé son cycle.
- id: appliance_seche_linge_termine
alias: Appliance - Sèche linge terminé
trigger:
- platform: state
entity_id: binary_sensor.dryer_machine
not_from:
- unavailable
- unknown
to: 'off'
action:
- service: notify.mobile_app_iphone_de_cedric
data_template:
title: Sèche linge terminé !
message: Le sèche linge a terminé son cycle.
- id: '1613323336828'
alias: ZHA - Aqara Wireless Mini Switch
description: ''
use_blueprint:
path: thedudeabides/zha-aqara-wireless-mini-switch-model-lumi-sensor-swit.yaml
input:
aqara_mini_switch: cb23e81a177749a253ed6851c1110046
button_single_press:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.button_short_press
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.button_short_press
button_double_press:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.button_double_press
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.button_double_press
button_long_press:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.button_long_press
button_released:
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.button_long_press
- alias: Noel - Activer/Desactiver Planifications
id: noel_toogle_plannifications
trigger:
- platform: state
entity_id: input_boolean.christmas_lights_run
action:
- service: "{% if states('input_boolean.christmas_lights_run') == 'on' %}\n switch.turn_on\n{%
else %}\n switch.turn_off\n{% endif %}\n"
target:
entity_id:
- switch.schedule_noel_semaine_sapin
- switch.schedule_noel_weekend_sapin
- alias: Harmony - Update Input Select
id: harmony_update_select
mode: single
trigger:
platform: state
entity_id: remote.harmony_hub
condition: []
action:
service: input_select.select_option
data_template:
entity_id: input_select.salon_tv_activity
option: '{% if trigger.to_state.attributes.current_activity == ''Regarder TV''
%} Orange {% elif trigger.to_state.attributes.current_activity == ''Regarder
Apple TV'' %} Apple TV {% elif trigger.to_state.attributes.current_activity
== ''AppleTV'' %} AirPlay {% else %} Power Off {% endif %}'
- alias: TV - Allumer leds TV
id: tv_allumer_leds
trigger:
- platform: state
entity_id: media_player.salon_tv
from: 'off'
to: 'on'
action:
- service: switch.turn_on
target:
entity_id:
- switch.metered_wall_plug_switch_2
- alias: LightDance
trigger:
platform: time_pattern
minutes: /5
seconds: 0
action:
- service: light.turn_on
target:
entity_id:
- light.hue_iris_1
- light.hue_play_1
data:
transition: 10
rgb_color:
- 255
- 70
- 0
- service: light.turn_on
target:
entity_id:
- light.hue_iris_2
- light.hue_play_2
- light.hue_go_1
data:
transition: 10
rgb_color:
- 192
- 5
- 255
- delay: 00:02:30
- service: light.turn_on
target:
entity_id:
- light.hue_iris_2
- light.hue_play_2
- light.hue_go_1
data:
transition: 10
rgb_color:
- 255
- 70
- 0
- service: light.turn_on
target:
entity_id:
- light.hue_iris_1
- light.hue_play_1
data:
transition: 10
rgb_color:
- 192
- 5
- 255
id: 0d42352768cc40f0bee06fa2192a3333
- alias: LightDanceChambre
trigger:
platform: time_pattern
minutes: /5
seconds: 0
action:
- service: light.turn_on
target:
entity_id:
- light.hue_color_lamp_2
data:
transition: 10
rgb_color:
- 255
- 70
- 0
- service: light.turn_on
target:
entity_id:
- light.osram_ruban
data:
transition: 10
rgb_color:
- 192
- 5
- 255
- delay: 00:02:30
- service: light.turn_on
target:
entity_id:
- light.osram_ruban
data:
transition: 10
rgb_color:
- 255
- 70
- 0
- service: light.turn_on
target:
entity_id:
- light.hue_color_lamp_2
data:
transition: 10
rgb_color:
- 192
- 5
- 255
id: 602de2e4b6ea43dfbe611a4a06e0c190
- id: '1653064612111'
alias: Watchdog - Lights Away
description: ''
trigger:
- platform: time_pattern
hours: /1
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.mode
state: away
- condition: state
entity_id: sensor.mode
state: holiday
- condition: state
entity_id: light.maison
state: 'on'
action:
- service: light.turn_off
data: {}
target:
entity_id: light.maison
mode: single
- id: '1655152020343'
alias: System - Check connexion
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.speedtest_cli_download
below: '100'
condition: []
action:
- service: notify.mobile_app_iphone
data_template:
title: Débit anormal
message: ⛈ débit mesuré anormal {{ states.sensor.speedtest_cli_download.state_with_unit
}}.
mode: single
- id: '1667770382777'
alias: ZHA - IKEA Remote - Chambre
description: ''
use_blueprint:
path: JeffKrz/zha-ikea-styrbar-custom-actions.yaml
input:
dimup_short:
- service: light.turn_on
data:
color_name: red
brightness_pct: 50
target:
device_id: 29026fa0343f5e0cd9bd653ceb0f6adb
remote: 75561eb9cf59a3597c689c163c46cb81
dimdown_short:
- service: light.turn_off
data: {}
target:
device_id: 29026fa0343f5e0cd9bd653ceb0f6adb