Run script and don't wait for its end

Dear all,
I updated my HA from 0.110.5 to 0.114 and since then, it seems that a lot of my scripts are behaving differently from before.
But, given the release notes in 0.114, it is perfectly normal :slight_smile:

But still I have a question. Please consider a scenario where Script A has a sequence of actions: call script1, call script2.
Is it possibile to call script2 as soon as script1 is started, without waiting for script1 to end?
When it comes to automations, do they behave the same? If an automation run script1 and script2, does it wait for script1 to end before starting script2?

Thanks!

1 Like

I just found the answer at: Scripts - Home Assistant

When calling a script โ€œdirectlyโ€ (e.g., script.NAME ) the calling script will wait for the called script to finish. If any errors occur that cause the called script to abort, the calling script will be aborted as well.

When calling a script (or multiple scripts) via the script.turn_on service the calling script does not wait. It starts the scripts, in the order listed, and continues as soon as the last script is started. Any errors that occur in the called scripts that cause them to abort will not affect the calling script.

Bye!

12 Likes