I am trying to pass the entity_id to a script so that the script and evaluate the state of that entity. The script has to evaluate the state because the script is waiting for that state to change.
The calling program:
It’s usually a good idea to setup the fields so you can test your script-as-service in the devtools. This part isn’t necessary, but it is good practice.
There’s no need to use an And condition when using two Template conditions since they can be combined in-template.
You use the id of the variable as-is in templates. While the template as a whole needs to be in quotes or nested under a multi-line quote, the variable itself should not be quoted.