#Voice Preview is occupied whilst running a script.

1 messages · Page 1 of 1 (latest)

hybrid hound
#

I have a few scripts which have time delays built in or run an IoT device for a defined period of time. If I use the Voice Preview to run those scripts, the device is occupied until the script is finished.

I can't run another command and the light keeps circling. Some of my scripts might run an IoT for 10 mins or so.

Why is this behaviour present? Am I missing something?

upper wraith
#

As a workaround you could maybe have an input helper be the trigger for an automation that calls the script.
Ask the assistant to set the input helper (or create a script that does it).
That way the script the PE runs is quick.

#

Massive hack so preferably the PE would not hang while executing your long running script.

outer pecan
#

you are probably using something like

action: script.whatever

If you use this, it won't keep the device busy

action: script.turn_on
target:
  entity_id: script.whatever
edgy coral
#

Maybe I'll create a script for exactly that... Providing a script to be run and an input var "wait for script".

outer pecan
#

It would be nice if script fields would also be shown in the GUI when script.turn_on is used

distant oak
#

There's a flag for this in intent scripts called async_action, just seems to not exist for regular scripts though.