-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscripts.yaml
More file actions
498 lines (472 loc) · 12.5 KB
/
scripts.yaml
File metadata and controls
498 lines (472 loc) · 12.5 KB
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
turn_off_all_lights:
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
floor_id:
- basement
- first_floor
area_id: outside
- action: media_player.turn_off
metadata: {}
data: {}
target:
device_id: 67ea5e07670054e7478713b887ed5895
- action: climate.turn_off
metadata: {}
data: {}
target:
entity_id: climate.heat_pump
enabled: false
alias: Turn off all
description: ''
icon: mdi:lightbulb-off
turn_off_things_before_sleeping:
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
floor_id:
- basement
area_id:
- entrance
- kitchen
- living_room
- hallway
- outside
- upstairs_bathroom
- dining_room
- action: media_player.turn_off
metadata: {}
data: {}
target:
device_id: 67ea5e07670054e7478713b887ed5895
alias: Turn off almost every thing before sleeping
description: ''
icon: mdi:lightbulb-off
halloween_lights:
sequence:
- action: scene.turn_on
metadata: {}
data:
transition: 2
target:
entity_id: scene.halloween
- repeat:
until:
- condition: state
state: 'off'
entity_id: light.rgbw_dimmer
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_pct: 25
transition: 4
target:
entity_id: light.entrance_lights
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- action: light.turn_on
metadata: {}
data:
brightness_pct: 5
transition: 4
target:
entity_id: light.entrance_lights
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
alias: Halloween lights
description: ''
flash_light_twice:
alias: Flash light twice
description: Flash a light from 100% to a dim level twice, then return to 100% smoothly
mode: single
fields:
target_light:
name: Light to flash
required: true
selector:
entity:
domain: light
variables:
dim_brightness_pct: 20
step_time: 1
sequence:
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
brightness_pct: 100
transition: '{{ step_time }}'
- delay:
seconds: '{{ step_time }}'
- repeat:
count: 2
sequence:
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
brightness_pct: '{{ dim_brightness_pct }}'
transition: '{{ step_time }}'
- delay:
seconds: '{{ step_time }}'
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
brightness_pct: 100
transition: '{{ step_time }}'
- delay:
seconds: '{{ step_time }}'
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
brightness_pct: 100
transition: 2
- delay:
seconds: 2
escape_room:
alias: Escape Room
mode: restart
fields:
player:
name: Player name
description: Name of the player
required: true
selector:
text:
start_delay:
name: Initial Delay (seconds)
description: Delay before starting the script
required: true
selector:
number:
min: 0
max: 300
step: 1
default: 0
sequence:
- delay:
seconds: '{{ start_delay }}'
- alias: 'Phase 1: Game instructions'
sequence:
- action: assist_satellite.announce
metadata: {}
data:
message: 'Bien le bonjour, est-ce que je parle à {{ player }}?
Ah ok! Est-ce que tu pourrais lui dire que je l''ai appelé? Ça serait apprécié.
Je vais rappeler dans quelques secondes.
Bonne journée!'
preannounce: false
target:
entity_id: assist_satellite.192_168_0_160
- delay:
hours: 0
minutes: 0
seconds: 8
milliseconds: 0
- action: assist_satellite.announce
metadata: {}
data:
message: 'Bien le bonjour très chère {{ player }}! Je t’attendais, et te voilà
maintenant arrivé.
Es-tu prête pour une aventure des plus extraordinaire ?
Que tu sois prête ou pas, il est trop tard pour reculer, alors voici ta
destiné:
Trouve les lettres cachées, et le trésor sera gagné.
Les couleurs sont tes alliées, alors laisse-toi guider.
À chaque lettre dénichée, une phrase secrète te sera dévoilée.
Il est maintenant temps pour toi de les découvrir, alors raccroche le téléphone,
c’est l’heure de commencer!
N’oublie pas de revenir me dire les phrases trouvées!
Bonne chance, camarade, ton destin est lancé!!'
preannounce: false
target:
entity_id: assist_satellite.192_168_0_160
- action: tts.speak
metadata: {}
target:
entity_id: tts.home_assistant_cloud
data:
cache: true
message: 'Bien le bonjour très chère {{ player }}! Je t’attendais, et te voilà
maintenant arrivé.
Es-tu prête pour une aventure des plus extraordinaire ?
Que tu sois prête ou pas, il est trop tard pour reculer, alors voici ta
destiné:
Trouve les lettres cachées, et le trésor sera gagné.
Les couleurs sont tes alliées, alors laisse-toi guider.
À chaque lettre dénichée, une phrase secrète te sera dévoilée.
Il est maintenant temps pour toi de les découvrir, alors raccroche le téléphone,
c’est l’heure de commencer!
N’oublie pas de revenir me dire les phrases trouvées!
Bonne chance, camarade, ton destin est lancé!!'
media_player_entity_id: media_player.sonos
enabled: false
- alias: 'Phase 1 [AI]: Find player and tell instructions'
action: assist_satellite.start_conversation
metadata: {}
target:
entity_id: assist_satellite.192_168_0_160
data:
start_message: Salut à toi! Est-ce que je parle à {{ player }}?!
preannounce: false
extra_system_prompt: 'On recherche {{ player }}.
- Si c''est {{ player }} qui répond, récite le txt ci-dessous.
- Si c''est quelqu''un d''autre qui répond, et tant que tu ne parles pas
à {{ player }}. continue de demander si quelqu''un l''a vue. Si la personne
qui te parle te dis qu''elle va te passer {{ player }}, répond une phrase
en attendant que {{ player }} arrive et se présente. Lorsque ce sera {{
player }} qui te parle, récite le txt ci-dessous.
txt à réciter, mot pour mot:
```txt
Super! Je t''attendais, {{ player }}! Es-tu prêt pour une aventure des plus
extraordinaire? Trouves les lettres cachées et le trésor sera à toi. Les
couleurs sont tes amis. À chaque lettre trouvée, viens-me la dire, je les
compilerai. Je te demanderais maintenant de raccrocher le téléphone, et
la lumière te guidera. Bonne chance!
```'
enabled: false
- alias: Disable automations
sequence:
- action: automation.turn_off
metadata: {}
data:
stop_actions: true
target:
entity_id: '{{ label_entities(''motions'') }}'
enabled: true
- action: automation.turn_off
metadata: {}
target:
entity_id:
- automation.sync_auxiliary_light_with_main_light
data:
stop_actions: true
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- alias: 'Phase 2: Find the letter T'
sequence:
- action: light.turn_on
metadata: {}
data:
transition: 2
brightness_pct: 5
target:
area_id:
- dining_room
- kitchen
- action: light.turn_off
metadata: {}
target:
floor_id:
- basement
area_id:
- living_room
- bedroom
- hallway
- upstairs_bathroom
- entrance
data:
transition: 2
enabled: true
- action: media_player.volume_set
metadata: {}
target:
entity_id: media_player.sonos
data:
volume_level: 0.35
- action: media_player.play_media
metadata: {}
target:
entity_id: media_player.sonos
data:
enqueue: play
media:
media_content_id: media-source://media_source/local/The Magician's Theme.mp3
media_content_type: audio/mpeg
metadata:
title: The Magician's Theme.mp3
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
browse_entity_id: media_player.sonos
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- action: light.turn_on
metadata: {}
target:
entity_id:
- light.chandelier
data:
transition: 1
brightness_pct: 10
- action: tts.speak
metadata: {}
target:
entity_id: tts.home_assistant_cloud
data:
cache: true
language: fr-FR
message: Ah! En passant, je suis toujours là pour toi! Si tu un peu perdu,
tu peux toujours venir me demander un indice au téléphone. Ok bonne chance
là!!
media_player_entity_id: media_player.sonos
options:
voice: Denise (whispering)
alias: Indice
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.chandelier
data:
transition: 2
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- action: script.flash_light_twice
metadata: {}
data:
target_light: light.hallway_lights
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- action: script.turn_on
target:
entity_id: script.rgb_color_loop
data:
variables:
target_light: light.motion_light
enabled: true
rgb_color_loop:
alias: RGB Color Loop
mode: restart
fields:
target_light:
name: Light
description: Light entity to loop colors on
required: true
selector:
entity:
domain: light
variables:
delay: 1
sequence:
- repeat:
while:
- condition: template
value_template: '{{ true }}'
sequence:
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
rgb_color:
- 255
- 0
- 0
transition: '{{ delay | int }}'
- delay: '{{ delay }}'
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
rgb_color:
- 0
- 255
- 0
transition: '{{ delay | int }}'
- delay: '{{ delay }}'
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
rgb_color:
- 0
- 0
- 255
transition: '{{ delay | int }}'
- delay: '{{ delay }}'
reset_after_escape_roome:
sequence:
- action: media_player.media_stop
metadata: {}
target:
entity_id: media_player.sonos
data: {}
- action: media_player.turn_off
metadata: {}
target:
entity_id: media_player.theatre_tv
data: {}
- action: automation.turn_on
metadata: {}
target:
entity_id: '{{ label_entities(''motions'') }}'
enabled: true
- action: automation.turn_on
metadata: {}
target:
entity_id:
- automation.sync_auxiliary_light_with_main_light
data: {}
- action: script.turn_off
metadata: {}
target:
entity_id:
- script.rgb_color_loop
- script.escape_room
- script.flash_light_twice
data: {}
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.reset_after_escape_room
data:
transition: 2
- action: script.turn_off
metadata: {}
target:
entity_id:
- script.rgb_color_loop
- script.escape_room
- script.flash_light_twice
data: {}
alias: Reset after escape room
description: ''