You can’t use a script service call with a non-script entity, nor can you specify multiple entity_ids like that. In any case, it sounds like you want this:
Assume there is an automation which processes some data (incl. changing them) + posting messages to Telegram (kind of logging).
I have a script (“script.post_message”) which does the very posting by Telegram (using some “notify.xxx” service).
So, this automation calls this script with args like “telegram chat”, “message”, …
And this call is performed by using “script.turn_on”.
So the automation does NOT wait for completion of this posting (which needs time).
My intention is to rebuild this script to allow a “wait for a completion” behaviour if needed:
– the automation calls the script “explicitly” (i.e. by “service: script.post_message”);
– the script either calls the “notify.xxx” service “explicitly” (i.e. by “service: notify.xxx”) and waits for it’s completion;
or (depends on some input arg)
– the script calls the “notify.xxx” service and LEAVES (not waits for it’s completion).
Coming back to this topic.
Assume there is a script which sends a notification via 2 channels (for instance, Telegram & persistent notifications) based on some input conditions:
Now I want to use only this SAME call in both automations:
- alias: do_smth_and_notify_2
...
action:
- action_1
- service: script.my_notify_advanced
data:
...pass a mode as a variable
- action_2
where the “my_notify_advanced” script choose a mode dependingly on some input variable:
– either call those “notify.xxx” & “notify.yyy” services, wait for their completions and then return;
– or call these services and immediately return (do not wait for their completion).
So, the question is - is it possible to call some service and DO NOT wait for its completion?