homeassistant.helpers.entity_registry module provides a registry to track entities and their metadata, uniquely identified by their domain, platform, and unique ID.
EntityRegistry Class
The main class for managing entity registration and lookup.Key Methods
async_get
Get entity entry by entity_id or entity entry id (UUID).Entity ID or entity registry entry ID
Entity entry or None if not found
async_get_entity_id
Get entity_id from domain, platform, and unique_id.Entity domain (e.g., “light”, “switch”)
Platform name (e.g., “hue”, “mqtt”)
Unique identifier from platform
Entity ID or None if not found
async_get_or_create
Get entity or create if it doesn’t exist.Entity domain
Platform name
Unique identifier
Suggested object ID for entity_id generation
Base for object ID (used with has_entity_name)
Config entry this entity belongs to
Config subentry ID
Device ID this entity belongs to
What disabled the entity (if creating)
What hid the entity (if creating)
Whether entity name describes only the entity itself
Category of entity (CONFIG, DIAGNOSTIC)
Original name as set by integration
Original icon as set by integration
Original device class as set by integration
Supported features bitfield
Entity capabilities
Unit of measurement
Translation key for entity name
Entity entry (created or existing)
async_remove
Remove an entity from registry.Entity ID to remove
async_update_entity
Update entity attributes.Entity ID to update
New name (user-customized)
New icon
New area ID
What disabled the entity
What hid the entity
Entity labels
Updated entity entry
async_get_available_entity_id
Get next available entity ID.Entity domain
Suggested object ID
Current entity ID (if renaming)
Additional IDs to avoid
Available entity ID
RegistryEntry
Frozen dataclass representing an entity registry entry.Properties
Entity ID (format: domain.object_id)
Unique identifier from platform
Platform name
Entity domain
Unique entry ID (UUID)
Config entry ID
Config subentry ID
Device ID
Area ID
Entity labels
User-customized name
Original name from integration
User-customized icon
Original icon from integration
User-customized device class
Original device class from integration
What disabled the entity (USER, DEVICE, INTEGRATION, CONFIG_ENTRY, HASS)
What hid the entity (USER, INTEGRATION)
Category of entity (CONFIG, DIAGNOSTIC)
Whether name describes only the entity itself
Translation key for entity name
Supported features bitfield
Entity capabilities
Unit of measurement
Entity-specific options
Alternative names for the entity
Categories per scope
When entity was created
When entity was last modified
Methods
Whether the entity is disabled
Whether the entity is hidden
Events
EVENT_ENTITY_REGISTRY_UPDATED
Fired when an entity is created, updated, or removed.Helper Functions
async_get_full_entity_name
Get full entity name including device name if appropriate.Home Assistant instance
Entity entry
Override for original_name
Full entity name
Enums
RegistryEntryDisabler
What disabled a registry entry.CONFIG_ENTRY- Disabled by config entryDEVICE- Disabled because device is disabledHASS- Disabled by Home AssistantINTEGRATION- Disabled by integrationUSER- Disabled by user
RegistryEntryHider
What hid a registry entry.INTEGRATION- Hidden by integrationUSER- Hidden by user