WTH Scripts arguments should be specified in the script designer, like in Script Blueprints

I know I can send arguments to scripts as data. But why I can’t use the script syntax (and UI) to specify these arguments and how they behave?

Something very similar already exists when I create a script from a Blueprint.

If I could specify arguments in the Script creation interface (e.g. entity selector, limited to lights domain, plus light settings), then, when I use that script in an Automation, it could show the arguments in the nice UI/friendly way, as you see them in the script blueprint creator.

You can actually specify all that and get exactly what you want right now, but you have to create the script in yaml.

Fields have a selector option → Scripts - Home Assistant

Fields are also what end up being your variables that go in data. So if you set this up properly in yaml, you’ll have a nice interface in the automation engine (and service_caller)

1 Like