WTH do scripts not have a unique id YAML key?

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?

Scripts have traces.

2 Likes

Are you sure your scripts don’t 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.

1 Like

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.

1 Like

Entities do have a “unique, system-assigned, non-changing ID”.

It’s in a file named core.entity_registry within the hidden .storage subdirectory.

Ah, good to know. I wish it were umm, a little more visible than that. Thanks.

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.