I have written a script that references and invokes another set of scripts.
sequence:
- action: script.script1
metadata: {}
data: {}
- action: script.script2
metadata: {}
data: {}
- action: script.script3
metadata: {}
data: {}
- action: script.script4
metadata: {}
data: {}
All the scripts get data somehow and then use assist_satellite.announce
to read it.
When I ask HA Voice PE to execute the script often only the first script from the sequence (script1
) is executed and it does not progress any further. When I compare successful and stuck job, it looks as follows:
Working:
{
"name": "script1",
"message": "started",
"entity_id": "script.script1",
"context_id": "01JRCJF2KWFTPAHBHW8EFM60MK",
"domain": "script",
"when": 1744178746.392885,
"context_user_id": "c0a9114dc2ea49258a52c2266b751e8e",
"context_domain": "script",
"context_service": "script1",
"context_event_type": "call_service"
},
{
"state": "responding",
"entity_id": "assist_satellite.home_assistant_voice",
"when": 1744178749.2226107,
"context_user_id": "c0a9114dc2ea49258a52c2266b751e8e",
"context_domain": "script",
"context_service": "script1",
"context_event_type": "call_service"
},
{
"name": "script2",
"message": "started",
"entity_id": "script.script2",
"context_id": "01JRCJF2KWFTPAHBHW8EFM60MK",
"domain": "script",
"when": 1744178786.4361637,
"context_user_id": "c0a9114dc2ea49258a52c2266b751e8e",
"context_domain": "script",
"context_service": "script2",
"context_event_type": "call_service"
},
.. continues with script3 and 4
And a logbook when the processing got stuck:
{
"name": "script1",
"message": "started",
"entity_id": "script.script1",
"context_id": "01JRHN6YV1T5CGSQFXYVJRD1CC",
"domain": "script",
"when": 1744349402.8051312,
"context_domain": "script",
"context_service": "script1",
"context_event_type": "call_service"
},
{
"state": "idle",
"entity_id": "assist_satellite.home_assistant_voice",
"when": 1744349405.8998666,
"context_domain": "script",
"context_service": "script1",
"context_event_type": "call_service"
},
{
"state": "responding",
"entity_id": "assist_satellite.home_assistant_voice",
"when": 1744349405.903556,
"context_domain": "script",
"context_service": "script1",
"context_event_type": "call_service"
}
]
(ends here)
I am suspicious about the idle state - it could be that sometimes script1
’s execution takes longer and before the response is read, Voice PE is suspended. Could this be the case? And if so, how do I prevent it from happening?
Thanks, jose