Hi,
Why is my entity_id: b839e63b491c96060bf05aba8565c4fa should it not look like: entity_id: kitchen_light
same counts for device_id: 76ad586d2a1f0a5f64d5cf09d7f7e7c3.
makes it very hard to write in yaml
Hi,
Why is my entity_id: b839e63b491c96060bf05aba8565c4fa should it not look like: entity_id: kitchen_light
same counts for device_id: 76ad586d2a1f0a5f64d5cf09d7f7e7c3.
makes it very hard to write in yaml
You can change an entity id if you want to. You shouldn’t be using device ids.
Good question. Not sure why this change was made but it is terrible. As per previous post try to avoid device ids, see: Why and how to avoid device_ids in automations and scripts
Understood and thanks for the tip, I’m still learning to work with home assistant.
But still why are all my entity_id’s randomly numbers and not readable text (like kitchen_light) and how can I change this if it can be change.
The first automations have been setup with the visual HA editor, so had no idea until I looked in the automation YAML file and noticed all my entity_id ‘s have random numbers.
Because you are using the UI to create your automations and that is the way the developers have chosen to store the information for some unfathomable reason.
Your entities may have descriptive names, look in Developer Tools → States or click on the entity in its device page or your dashboard to bring up the more-info box then click on the cog icon up top.
Thanks Tom for clarifing Kinda strange to have basically two unique identifiers but i’m not complaining as happy with HA.
Yes it is and I have no idea why it was done.
If you go to the more-info box as @tom_l says you can edit the entity id (and the icon and the descriptive name):
However, it’s important to do this before you use the entity id in any automations or scripts because the old entity id won’t change there - you’ll have to go through them all and re-write them.
Thx, good to know this as well. Appriciated. Guess I’ll have some hours to spend to re-write the automation yaml.
It was done to link the device trigger/condition/action to the config entry and device entry. That way, you can change the entity_id and it will still work.
If you use the UI, this won’t matter. If you’re using yaml, just use the entity_id.
Personally, I recommend avoiding device triggers/conditions/actions.
Ah, that’s why. Thanks.
I don’t use the UI much - or at all for automations, so was intrigued.
Indeed.