Unique ID
An ID that an integration gives an entity or config entry, which never changes, so Home Assistant recognizes it after a restart.
- In code
unique_id_attr_unique_id- Also
- unique IDs
An entity with a unique ID gets an entry in the entity registry. Only then can users change its name, area, icon, and entity ID in the UI.
A unique ID comes from something that does not change, like a serial number or a MAC address. Not a name, IP address, or host name: those can change.