service: script.turn_on
target:
entity_id: script.somescript
And
service: script.somescript
I’m asking because I was trying to execute a script using the API with Windows Powershell and couldn’t work out the syntax to run a script without using the entity_id as in :
Scripts don’t have an “enabled state”. They are only ever running (on) or idle (off).
They are neither ever enabled or disabled because they aren’t a self executing entity in themselves because they are only ever called externally to the script. So being enabled/disabled wouldn’t make any sense. In that sense scripts are always enabled since they are always available and waiting to be called.
by contrast, automations are enabled/disabled because they are self triggering. So that concept there makes sense.
I will say that the states that HA uses for the two are fairly confusing because they use the exact same states to men two totally different things.