I need to be able to run the script without it prompting and instead just use the default value (seems like that should either be the default behaviour or at least there should be an option to have it do that). I can achieve that using a wrapper script butt that really shouldn’t;t be necessary. Is there any configuration option for the Entities card that can do what I need, or do I have to create wrapper scripts for all of these cases?
I did read that but it says to use fields (which is where I started) to define the input variables. it does also say that variables can be passed to the script using
data:
variables:
when the script is called but I can’t find an example of how you then use those variables within the script. In my example I might pass in a value for ‘sduration’ or I might not. In the script code I would need to test if duration was set or not and if not assign it a (default) value. Then I’d need to use the variable later on in the script (presumably via a template {{ sduration }})?
These are the bits I am stuck on:
testing the variable within the script and assigning a default value