Regarding the service_template, its not needed anymore since 2020, but it is still in a lot of examples and documentation, which is irritating, see https://github.com/home-assistant/core/pull/39210
I try to pass the entire event data array, not a single value, so i can use one automation to call different scripts regarding grocy without knowing before which values are neded by this script.
How can i do this?
Or should i use node red instead? Does it help preventing such big template blocks with ifs and else?
Now it works passing the event.data array to the script, i think i had some other mismatch.
I changed my player ids to media_player.siteId, so i dont need to tell rhasspy, which player to use.
It also works for entity_id, but i added player to data fore use as entity_id for simplicity.