See title: why the heck do scripts not have a unique id in YAML config? I’d like to for example see traces for my scripts, but these are not available.
If the problem is deeper than just a unique id, I’d like to change my WTH to WTH do scripts not have traces?
All my scripts are defined in YAML and have traces.
Scripts already have unique object IDs due to the way they are defined (unlike automations that create it from the alias field). It would be more consistent behaviour though, to explicitly define a UID.
Why don’t ALL entities for all object types have unique ID’s – unique, system-assigned, non-changing ID’s. Allow the user to change name as desired, but skip the confusing “do you want me to change the entity ID’s when you change the device ID”. Just system-assigned ID’s, and always display entity name along with entity ID.
There’s little need to make it visible because you can’t do anything with it (no scripting features or templating functions designed to use it).
Generally speaking, everything available is designed to refer to an entity by its entity_id. You can change it because internally the entity continues to be known by its (untouchable) id value.