-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
565 lines (564 loc) · 15.4 KB
/
scripts.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
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
camera_play:
alias: Play Video on Chromecast
sequence:
- service: camera.play_stream
data_template:
media_player: '{% if is_state("input_select.camera_display", "Bedroom display")
%} media_player.mibox4_2 {% elif is_state("input_select.camera_display", "Living
Room display") %} media_player.mecool_ofir {% elif is_state("input_select.camera_display",
"Office display") %} media_player.mibox4 {% endif %}
'
entity_id: '{% if is_state("input_select.camera_select", "Living Room") %} camera.living_room_sub
{% elif is_state("input_select.camera_select", "Dining Table") %} camera.dining_table_sub
{% endif %} '
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Play Video on Chromecast script has been triggered!"
mode: single
ir_learn_mode_on:
alias: IR Learn Mode On
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/Smart IR Remote Control/set
payload: '{"learn_ir_code":"ON"}'
qos: 0
retain: false
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Living Room IR device is now on Learn Mode"
mode: single
icon: mdi:remote
ir_turn_on_off_living_room_tv:
alias: IR Toggle Living Room TV
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/Smart IR Remote Control/set
payload: '{"ir_code_to_send": "BWEjoBE5AsABA8sGOQLgCwFAF0ADQAFAB+AHA+ADAUAb4AcBQBPAA0ABwAvABwn5nWEj8wg5Av//4GIHAgg5Ag=="}'
qos: 0
retain: false
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Living room IR has turned ON/OFF Living room TV!"
mode: single
icon: mdi:remote-tv
ir_learn_mode_on_bedroom:
alias: IR Learn Mode On (Bedroom)
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/Bedroom Smart IR Remote Control/set
payload: '{"learn_ir_code":"ON"}'
qos: 0
retain: false
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Bedroom IR device is now on Learn Mode"
mode: single
icon: mdi:remote
ir_turn_on_off_bedroom_tv:
alias: IR Toggle Bedroom TV
sequence:
- service: mqtt.publish
data:
topic: zigbee2mqtt/Bedroom Smart IR Remote Control/set
payload: '{"ir_code_to_send": "BaIjxREpAkABB4QCKQK6BikCQAfgBwFAF0ADQAFAB+AHA0ABwDdAG+AHAUATwANAAcALwAcJTJ6iI9oIKQL//+BLBwCE4EZX4AdP4AcP4E/H4DdX4Gen4A9v4A8X4DffCSkC//+iI9oIKQI="}'
qos: 0
retain: false
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Bedroom IR to turn ON/OFF TV has been triggered!"
mode: single
icon: mdi:remote-tv
turn_off_on_kitchen_light:
alias: Toggle Kitchen Light
sequence:
- service: light.toggle
metadata: {}
data: {}
target:
entity_id: light.kitchen_l1
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Kitchen light has been triggered!"
mode: single
icon: hue:ceiling-round
turn_on_switcher_for_60mins:
alias: Turn ON Boiler for 60 minutes
sequence:
- service: switch.turn_on
target:
device_id: 928250a9ace44dda8bbe162fc9440d6d
data: {}
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Turn On Switcher for 60 minutes has been triggered! "
- delay:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
device_id:
- 928250a9ace44dda8bbe162fc9440d6d
data: {}
mode: single
icon: mdi:water-boiler-auto
shower_music:
alias: Shower Music
sequence:
- service: spotcast.start
data:
device_name: Shower Echo Dot
uri: spotify:playlist:3OrzpgkRM3gHd4xAhy86Zr
random_song: true
shuffle: true
force_playback: true
start_volume: 86
mode: single
icon: mdi:account-music
toggle_living_room_ac:
alias: Toggle Living Room AC
sequence:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: climate.ofir_a_c
state: cool
- condition: state
entity_id: climate.ofir_a_c
state: heat
- condition: state
entity_id: climate.ofir_a_c
state: heat_cool
sequence:
- service: climate.turn_off
data: {}
target:
entity_id: climate.ofir_a_c
- conditions:
- condition: state
entity_id: climate.ofir_a_c
state: 'off'
sequence:
- service: climate.turn_on
data: {}
target:
entity_id: climate.ofir_a_c
mode: single
icon: mdi:air-conditioner
toggle_bedroom_ac:
alias: Toggle Bedroom AC
sequence:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: climate.bedroom_ac
state: cool
- condition: state
entity_id: climate.bedroom_ac
state: heat
- condition: state
entity_id: climate.bedroom_ac
state: heat_cool
sequence:
- service: climate.turn_off
data: {}
target:
entity_id: climate.bedroom_ac
- conditions:
- condition: state
entity_id: climate.bedroom_ac
state: 'off'
sequence:
- service: climate.turn_on
data: {}
target:
entity_id: climate.bedroom_ac
mode: single
icon: mdi:air-conditioner
home_leave:
alias: Home Leave
sequence:
- data:
message: "\U0001F916 Automation - Home Leave activated!"
action: notify.supervisor_telegram
- repeat:
while:
- condition: template
value_template: '{{ is_state(''input_select.bedroom_tv_status'', ''On'') or
is_state(''input_select.bedroom_ac_status'', ''On'') or is_state(''input_select.living_room_tv_status'',
''On'') or is_state(''input_select.office_tv_status'', ''On'') or is_state(''input_select.office_ac_status'',
''On'') or is_state(''input_select.wardrobe_ac_status'', ''On'') or is_state(''input_select.shower_heater_status'',
''On'')}}'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.bedroom_tv_status
state: 'On'
sequence:
- data:
topic: zigbee2mqtt/Bedroom Smart IR Remote Control/set
payload: '{"ir_code_to_send": "BaIjxREpAkABB4QCKQK6BikCQAfgBwFAF0ADQAFAB+AHA0ABwDdAG+AHAUATwANAAcALwAcJTJ6iI9oIKQL//+BLBwCE4EZX4AdP4AcP4E/H4DdX4Gen4A9v4A8X4DffCSkC//+iI9oIKQI="}'
qos: 0
retain: false
action: mqtt.publish
enabled: true
- choose:
- conditions:
- condition: state
entity_id: input_select.bedroom_ac_status
state: 'On'
sequence:
- data: {}
target:
entity_id: climate.bedroom_ac
action: climate.turn_off
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: climate.ofir_a_c
state: cool
- condition: state
entity_id: climate.ofir_a_c
state: heat
sequence:
- data: {}
target:
entity_id: climate.ofir_a_c
action: climate.turn_off
- choose:
- conditions:
- condition: state
entity_id: input_select.living_room_tv_status
state: 'On'
sequence:
- data:
topic: zigbee2mqtt/Smart IR Remote Control/set
payload: '{"ir_code_to_send": "BWEjoBE5AsABA8sGOQLgCwFAF0ADQAFAB+AHA+ADAUAb4AcBQBPAA0ABwAvABwn5nWEj8wg5Av//4GIHAgg5Ag=="}'
qos: 0
retain: false
enabled: false
action: mqtt.publish
- metadata: {}
data: {}
action: script.ir_turn_on_off_living_room_tv
- choose:
- conditions:
- condition: state
entity_id: input_select.office_tv_status
state: 'On'
sequence:
- data: {}
action: script.tv_power_office
- choose:
- conditions:
- condition: state
entity_id: input_select.office_ac_status
state: 'On'
sequence:
- data: {}
target:
entity_id: climate.office
action: climate.turn_off
- choose:
- conditions:
- condition: state
entity_id: input_select.wardrobe_ac_status
state: 'On'
sequence:
- data: {}
target:
entity_id:
- climate.wardrobe
action: climate.turn_off
- choose:
- conditions:
- condition: state
entity_id: input_select.shower_heater_status
state: 'On'
sequence:
- target:
entity_id: switch.heater_shower
data: {}
action: switch.turn_off
- delay:
hours: 0
minutes: 9
seconds: 55
milliseconds: 0
- data:
message: "\U0001F916 Automation - Home Leave electric devices are OFF!"
action: notify.supervisor_telegram
- continue_on_error: true
data: {}
target:
area_id:
- living_room
- kitchen
- wardrobe
- shower
entity_id:
- light.office
- light.office_bathroom
- light.office_wall_light
- light.ofir_desk_led
action: light.turn_off
- data: {}
target:
entity_id: switch.kitchen_led_strip
action: switch.turn_off
- data:
message: "\U0001F916 Automation - House devices are OFF!"
action: notify.supervisor_telegram
mode: single
icon: mdi:hand-wave
tv_power_office:
alias: TV Power Office
sequence:
- service: remote.send_command
metadata: {}
data:
device: TV
command: Power
target:
device_id: 213c1e28be789af24d278bfa20f54941
mode: single
icon: mdi:television
turn_on_boiler_for_35_minutes:
alias: Turn ON Boiler for 35 minutes
sequence:
- service: switch.turn_on
target:
device_id: 928250a9ace44dda8bbe162fc9440d6d
data: {}
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Turn On Switcher for 35 minutes has been triggered! "
- delay:
hours: 0
minutes: 35
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
device_id:
- 928250a9ace44dda8bbe162fc9440d6d
data: {}
mode: single
icon: mdi:water-boiler-auto
turn_on_boiler_for_45_minutes:
alias: Turn ON Boiler for 45 minutes
sequence:
- service: switch.turn_on
target:
device_id: 928250a9ace44dda8bbe162fc9440d6d
data: {}
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Turn On Switcher for 45 minutes has been triggered! "
- delay:
hours: 0
minutes: 45
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
device_id:
- 928250a9ace44dda8bbe162fc9440d6d
data: {}
mode: single
icon: mdi:water-boiler-auto
toggle_office_ac:
alias: Toggle Office AC
sequence:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: climate.office
state: cool
- condition: state
entity_id: climate.office
state: heat
- condition: state
entity_id: climate.office
state: heat_cool
sequence:
- service: climate.turn_off
data: {}
target:
entity_id:
- climate.office
- conditions:
- condition: state
entity_id: climate.office
state: 'off'
sequence:
- service: climate.turn_on
data: {}
target:
entity_id:
- climate.office
mode: single
icon: mdi:air-conditioner
toggle_living_room_light:
alias: Toggle Living Room Light
sequence:
- service: light.toggle
metadata: {}
data: {}
target:
entity_id:
- light.living_room_l1
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Living Room Light has been triggered!"
mode: single
icon: mdi:ceiling-light
toggle_bedroom_light:
alias: Toggle Bedroom Light
sequence:
- service: light.toggle
metadata: {}
data: {}
target:
entity_id: light.bedroom
- service: notify.supervisor_telegram
data:
message: "\U0001F4DC Script - Bedroom Light has been triggered!"
mode: single
icon: mdi:ceiling-fan-light
office_corner_led_toggle:
alias: Office Corner LED Toggle
sequence:
- service: remote.send_command
metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Corner_RGB_Lamp
command: Power
target:
device_id: 213c1e28be789af24d278bfa20f54941
mode: single
icon: mdi:led-strip
unlock_main_door:
alias: Unlock Main Door
sequence:
- metadata: {}
data: {}
target:
entity_id:
- lock.front_door_2
- lock.front_door
action: lock.unlock
- data:
message: "\U0001F916 Automation - \U0001F6AA Main Door Unlocked by Script! \U0001F510"
action: notify.supervisor_telegram
mode: single
icon: mdi:lock-open
boil_tami4_water:
alias: Boil Tami4 Water
sequence:
- action: button.press
metadata: {}
data: {}
target:
entity_id: button.tami4_boil_water
- data:
message: "\U0001F4DC Script - Boil Tami4 Water has been triggered!"
action: notify.supervisor_telegram
- if:
- condition: state
entity_id: person.elian
state: home
then:
- action: notify.mobile_app_elians_iphone
metadata: {}
data:
message: ♨️ Boiling Tami4 Water ♨️
alias: If Elian Home - Notification
- alias: If TV ON - Notification
if:
- condition: state
entity_id: input_select.living_room_tv_status
state: 'On'
then:
- action: notify.living_room_lg_webos_smart_tv
data:
message: ♨️ Boiling Tami4 Water ♨️
description: ''
icon: mdi:kettle-steam
living_room_blinds_open:
alias: Living Room - Blinds Open
sequence:
- action: cover.close_cover
metadata: {}
data: {}
target:
entity_id: cover.living_room_blinds
- data:
message: "\U0001F4DC Script - \U0001FA9F Living Room - Blinds Open \U0001F6CB️"
action: notify.supervisor_telegram
description: ''
icon: mdi:blinds-open
living_room_blinds_close:
alias: Living Room - Blinds Close
sequence:
- action: cover.open_cover
metadata: {}
data: {}
target:
entity_id: cover.living_room_blinds
- data:
message: "\U0001F4DC Script - \U0001FA9F Living Room - Blinds Close \U0001F6CB️"
action: notify.supervisor_telegram
description: ''
icon: mdi:blinds
turn_all_lights_off:
alias: Turn ALL Lights OFF
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
area_id:
- bedroom
- kitchen
- living_room
- shower
- wardrobe
entity_id:
- light.office
- light.office_bathroom
- light.office_wall_light
- light.yeelink_color5_6079_light
- light.bathroom
- light.ofir_desk_led
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.kitchen_led_strip
- if:
- condition: state
entity_id: input_select.office_corner_led_light_status
state: 'on'
then:
- action: script.office_corner_led_toggle
metadata: {}
data: {}
description: ''
icon: mdi:lamps-outline