Another question:
if I have another service template (as action) when the second service_template is executed ?
Is it after the end of the first service template )
Is it in another thread ie in the same time as the first service_template ?
Many thanks for your help writing automation !
Regards
You can’t write a service_template like that so that fact invalidates your other two questions. A service_template can call a service and cannot contain other YAML code like service or delay.
Unless you are using an old version of Home Assistant, you can now use the term servicewith a template and it’s no longer necessary to use the term service_template.
As suggested by Tinkerer, what you want to do is achieved with choose (see: Choose a group of actions).
For example, this is the equivalent of an “if-else” using choose