I have now created a script inside scripts.yaml file which I can call.
Is it possible to call this script with parameters ?
For example, this is used for turning on a light, then wait 4 minutes and then turn it off again. But my problem is that I would like to use this functionality in several light groups, but the light groups are “hardcoded” inside the turn_on and turn_off parts of the script.
So - can I call a script with some kinds of parameters ?
Then you can put this_light to kitchen in another automation or whatever.
It’s very powerful when you get the hang of it, I use a much more complicated version for my notification engine, you call script.notify with some parameters and it generates a message and you can choose whether it goes to text (and whom receives it), speech via TTS over the speakers, and an on screen message via persistent notification, or any combination of the three notification methods, which in turn are scripts that receive parameters from script.notify
If any of that made sense to you, the file in my repo that makes this happen is
link removed
You’ll notice that the meat-and-bones of script.notify is in an include, which is here…