-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscripts.yaml
More file actions
1614 lines (1588 loc) · 49.8 KB
/
Copy pathscripts.yaml
File metadata and controls
1614 lines (1588 loc) · 49.8 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
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
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
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:
- alias: La v1 reprend le matériel partagé
action: input_boolean.turn_off
target:
entity_id: input_boolean.escape_v2_active
- action: homeassistant.reload_config_entry
data:
entry_id: 01KER0F189EWYCFNSKCFX1G46P
continue_on_error: true
- alias: Voix du téléphone pour la v1
action: select.select_option
target:
entity_id: select.192_168_0_160_assistant
data:
option: 'Escape Room V1: Denise'
- 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: homeassistant.reload_config_entry
data:
entry_id: 01KER0F189EWYCFNSKCFX1G46P
continue_on_error: true
- action: media_player.media_stop
metadata: {}
target:
entity_id:
- media_player.sonos
- media_player.workshop_echo
- media_player.google_home_mini
data: {}
continue_on_error: true
- 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: {}
- action: script.turn_off
target:
entity_id: "{{ states.script | map(attribute='entity_id')\n | select('search',
'^script\\.mystery_') | list }}"
- action: script.mystery_reset_state
- action: input_boolean.turn_off
target:
entity_id: input_boolean.escape_v2_active
- action: media_player.volume_set
target:
entity_id:
- media_player.sonos
- media_player.google_home_mini
data:
volume_level: 0.35
continue_on_error: true
- action: select.select_option
target:
entity_id: select.192_168_0_160_assistant
data:
option: preferred
continue_on_error: true
- action: vacuum.return_to_base
target:
entity_id: vacuum.roborock_s5_7c79_robot_cleaner
continue_on_error: true
- 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: light.turn_off
target:
entity_id: light.auxiliary_lamp
data:
transition: 1
continue_on_error: true
- 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: ''
mystery_flash_alternate:
alias: Mystery - Alternating light flash
icon: mdi:police-badge
mode: restart
fields:
light_a:
name: First light
required: true
selector:
entity:
domain: light
light_b:
name: Second light
required: true
selector:
entity:
domain: light
color_a:
name: First color (rgb)
required: true
selector:
object: {}
color_b:
name: Second color (rgb)
required: true
selector:
object: {}
cycles:
name: Number of alternations
required: true
selector:
number:
min: 1
max: 100
step: 1
interval:
name: Seconds per half-flash
selector:
number:
min: 0.1
max: 5
step: 0.05
default: 0.25
variables:
half_flash_ms: '{{ (interval | float * 1000) | int }}'
sequence:
- repeat:
count: '{{ cycles | int }}'
sequence:
- action: light.turn_on
target:
entity_id: '{{ light_a }}'
data:
rgb_color: '{{ color_a }}'
brightness_pct: 100
- action: light.turn_off
target:
entity_id: '{{ light_b }}'
- delay:
milliseconds: '{{ half_flash_ms }}'
- action: light.turn_on
target:
entity_id: '{{ light_b }}'
data:
rgb_color: '{{ color_b }}'
brightness_pct: 100
- action: light.turn_off
target:
entity_id: '{{ light_a }}'
- delay:
milliseconds: '{{ half_flash_ms }}'
- action: light.turn_off
target:
entity_id:
- '{{ light_a }}'
- '{{ light_b }}'
data:
transition: 2
mystery_sonos_glow:
alias: Mystery - Sonos voice glow
icon: mdi:chandelier
mode: queued
max: 3
fields:
duration_seconds:
name: Duration (seconds)
description: Durée estimée de la réplique — le temps que les lumières restent
montées.
required: true
selector:
number:
min: 1
max: 120
step: 1
variables:
chandelier_before: '{{ state_attr(''light.chandelier'', ''brightness'') }}'
kitchen_before: '{{ state_attr(''light.kitchen_middle_light'', ''brightness'')
}}'
sequence:
- action: light.turn_on
target:
entity_id:
- light.chandelier
- light.kitchen_middle_light
data:
brightness_step_pct: 15
transition: 1
continue_on_error: true
- delay:
seconds: '{{ duration_seconds }}'
- if: '{{ chandelier_before is none }}'
then:
- action: light.turn_off
target:
entity_id: light.chandelier
data:
transition: 1
continue_on_error: true
else:
- action: light.turn_on
target:
entity_id: light.chandelier
data:
brightness: '{{ chandelier_before }}'
transition: 1
continue_on_error: true
- if: '{{ kitchen_before is none }}'
then:
- action: light.turn_off
target:
entity_id: light.kitchen_middle_light
data:
transition: 1
continue_on_error: true
else:
- action: light.turn_on
target:
entity_id: light.kitchen_middle_light
data:
brightness: '{{ kitchen_before }}'
transition: 1
continue_on_error: true
mystery_reset_state:
alias: Mystery - Reset game state
icon: mdi:restore
mode: single
sequence:
- action: input_select.select_option
target:
entity_id: input_select.mystery_phase
data:
option: idle
- action: input_select.select_option
target:
entity_id: input_select.mystery_accusation_choice
data:
option: none
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.mystery_gardener_done
- input_boolean.mystery_heiress_done
- input_boolean.mystery_butler_done
- input_boolean.mystery_heiress_gun_seen
- input_boolean.mystery_heiress_dress_seen
- input_boolean.mystery_evidence_saw
- input_boolean.mystery_evidence_gun
- input_boolean.mystery_evidence_poison
- input_boolean.mystery_terminal_unlocked
- input_boolean.mystery_terminal_first_touch
- input_boolean.mystery_dossier_open
- action: input_text.set_value
target:
entity_id: input_text.mystery_code_input
data:
value: ''
- action: input_text.set_value
target:
entity_id: input_text.mystery_reveal_media
data:
value: ''
mystery_inspector_say:
alias: Mystery - Inspector speaks
icon: mdi:phone-in-talk
mode: queued
max: 3
fields:
message:
name: Message
required: true
selector:
text:
multiline: true
on_sonos:
name: Parler sur le Sonos plutôt qu'au téléphone
description: Sur place, tout le monde entend — au téléphone, une seule personne
tient le combiné. Le briefing passe donc par le Sonos.
selector:
boolean: {}
default: false
on_terminal:
name: Parler sur le terminal du bureau
description: 'Pour tout ce qui suit une action à l''écran : les joueurs sont
au sous-sol devant le terminal, le téléphone est au salon.'
selector:
boolean: {}
default: false
on_tv:
name: Parler sur la TV du théâtre
description: 'Pour l''annonce juste avant le dénouement : les joueurs sont déjà
au théâtre, face à l''écran.'
selector:
boolean: {}
default: false
variables:
speech_seconds: '{{ [(message.split() | count / 2.3) | round(0, ''ceil'') | int,
6] | max }}'
sequence:
- choose:
- conditions: '{{ on_terminal }}'
sequence:
- event: mystery_terminal_say
event_data:
message: '{{ message }}'
- delay:
seconds: '{{ speech_seconds }}'
- conditions: '{{ on_sonos }}'
sequence:
- action: media_player.volume_set
target:
entity_id: media_player.sonos
data:
volume_level: 0.6
- action: script.turn_on
target:
entity_id: script.mystery_sonos_glow
data:
variables:
duration_seconds: '{{ speech_seconds }}'
continue_on_error: true
- action: tts.speak
target:
entity_id: tts.home_assistant_cloud
data:
cache: true
language: fr-FR
media_player_entity_id: media_player.sonos
message: '{{ message }}'
options:
voice: HenriNeural
- delay:
seconds: '{{ speech_seconds }}'
- conditions: '{{ on_tv }}'
sequence:
- action: tts.speak
target:
entity_id: tts.home_assistant_cloud
data:
cache: true
language: fr-FR
media_player_entity_id: media_player.theatre_tv
message: '{{ message }}'
options:
voice: HenriNeural
- delay:
seconds: '{{ speech_seconds }}'
default:
- action: assist_satellite.announce
target:
entity_id: assist_satellite.192_168_0_160
data:
preannounce: false
message: '{{ message }}'
mystery_guide_path:
alias: Mystery - Light trail guidance
icon: mdi:map-marker-path
mode: restart
fields:
lights:
name: Lights, in walking order
required: true
selector:
object: {}
trail_brightness_pct:
name: Brightness left behind
selector:
number:
min: 1
max: 100
step: 1
default: 15
sequence:
- repeat:
for_each: '{{ lights }}'
sequence:
- variables:
beacon: '{{ repeat.item }}'
- repeat:
count: 3
sequence:
- action: light.turn_off
target:
entity_id: '{{ beacon }}'
- delay:
milliseconds: 400
- action: light.turn_on
target:
entity_id: '{{ beacon }}'
data:
brightness_pct: 100
- delay:
milliseconds: 400
- action: light.turn_on
target:
entity_id: '{{ beacon }}'
data:
brightness_pct: '{{ trail_brightness_pct | default(15) | int }}'
transition: 1
mystery_ambience:
alias: Mystery - Investigation ambience
icon: mdi:candle
mode: restart
sequence:
- action: media_player.volume_set
target:
entity_id: media_player.sonos
data:
volume_level: 0.52
continue_on_error: true
- action: media_player.play_media
target:
entity_id: media_player.sonos
data:
media_content_type: audio/mpeg
media_content_id: media-source://media_source/local/Investigation Ambience.mp3
continue_on_error: true
- action: light.turn_on
target:
entity_id:
- light.chandelier
- light.dining_room_pendants
- light.kitchen_lights
data:
brightness_pct: 6
transition: 3
continue_on_error: true
- action: light.turn_on
target:
entity_id: light.auxiliary_lamp
data:
effect: glisten
continue_on_error: true
- repeat:
while:
- condition: state
entity_id: input_select.mystery_phase
state:
- investigation
- autopsy_done
- accusation
- condition: template
value_template: '{{ repeat.index <= 450 }}'
sequence:
- action: light.turn_on
target:
entity_id:
- light.left_floor_lamp
- light.right_floor_lamp
data:
rgb_color:
- 90
- 0
- 130
brightness_pct: 35
transition: 6
- delay:
seconds: 8
- action: light.turn_on
target:
entity_id:
- light.left_floor_lamp
- light.right_floor_lamp
data:
rgb_color:
- 130
- 25
- 10
brightness_pct: 8
transition: 6
- delay:
seconds: 8
mystery_roby_goto:
alias: Mystery - Roby drives to a clue
icon: mdi:incognito
mode: restart
fields:
destination:
name: Destination
selector:
select:
options:
- wine
- trap
- spices
required: true
lead_in_seconds:
name: Wait before leaving (seconds)
description: Laisse le suspect finir sa réplique avant que Roby démarre.
selector:
number:
min: 0
max: 120
step: 1
default: 0
variables:
# spices : rack d'épices en salle à manger, calibré en live le 7 août 2026
# (8,7 m arrière, 2,2 m à droite du dock). Aucun indice ne s'en sert pour
# l'instant — gardé exprès : pour rebasculer l'indice du Majordome du vin
# vers les épices, il suffit de remettre 'spices' dans `destination` de
# mystery_hint_request. La calibration, elle, coûte une soirée à refaire.
coords: "{{ {'wine': [23000, 31500],\n 'trap': [25050, 25000],\n 'spices':
[26700, 31200]}[destination] }}"
travel_seconds: '{{ 65 if destination == ''wine'' else 100 }}'
locate_calls: '{{ 1 if destination == ''wine'' else 4 }}'
sequence:
- delay:
seconds: '{{ lead_in_seconds | int }}'
- action: vacuum.send_command
target:
entity_id: vacuum.roborock_s5_7c79_robot_cleaner
data:
command: app_goto_target
params: '{{ coords }}'
- delay:
seconds: '{{ travel_seconds | int }}'
- repeat:
count: '{{ locate_calls | int }}'
sequence:
- action: vacuum.locate
target:
entity_id: vacuum.roborock_s5_7c79_robot_cleaner
continue_on_error: true
- delay:
seconds: 25
mystery_hint_request:
alias: Mystery - Suspect hint (Roby to clue)
icon: mdi:incognito
mode: restart