Classes | |
| class | _EventEntityRegistryUpdatedData_CreateRemove |
| class | _EventEntityRegistryUpdatedData_Update |
| class | DeletedRegistryEntry |
| class | EntityRegistry |
| class | EntityRegistryItems |
| class | EntityRegistryStore |
| class | RegistryEntry |
| class | RegistryEntryDisabler |
| class | RegistryEntryHider |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| int | CLEANUP_INTERVAL = 3600 * 24 |
| tuple | DISPLAY_DICT_OPTIONAL |
| ENTITY_CATEGORY_INDEX_TO_VALUE = dict(enumerate(EntityCategory)) | |
| dictionary | ENTITY_DESCRIBING_ATTRIBUTES |
| EntityOptionsType | |
| EventEntityRegistryUpdatedData | |
| int | ORPHANED_ENTITY_KEEP_SECONDS = 3600 * 24 * 30 |
| ReadOnlyEntityOptionsType | |
| string | STORAGE_KEY = "core.entity_registry" |
| int | STORAGE_VERSION_MAJOR = 1 |
| int | STORAGE_VERSION_MINOR = 15 |
Provide a registry to track entity IDs. The Entity Registry keeps a registry of entities. Entities are uniquely identified by their domain, platform and a unique id provided by that platform. The Entity Registry will persist itself 10 seconds after a new entity is registered. Registering a new entity while a timer is in progress resets the timer.
|
private |
Clean up device registry when entities removed.
Definition at line 1521 of file entity_registry.py.
|
private |
Set up the entity restore mechanism.
Definition at line 1578 of file entity_registry.py.
|
private |
Protect entity options from being modified.
Definition at line 160 of file entity_registry.py.
|
private |
Validate entity registry item.
Definition at line 646 of file entity_registry.py.
| None homeassistant.helpers.entity_registry.async_config_entry_disabled_by_changed | ( | EntityRegistry | registry, |
| ConfigEntry | config_entry | ||
| ) |
Handle a config entry being disabled or enabled. Disable entities in the registry that are associated with a config entry when the config entry is disabled, enable entities in the registry that are associated with a config entry when the config entry is enabled and the entities are marked DISABLED_CONFIG_ENTRY.
Definition at line 1491 of file entity_registry.py.
| list[RegistryEntry] homeassistant.helpers.entity_registry.async_entries_for_area | ( | EntityRegistry | registry, |
| str | area_id | ||
| ) |
Return entries that match an area.
Definition at line 1452 of file entity_registry.py.
| list[RegistryEntry] homeassistant.helpers.entity_registry.async_entries_for_category | ( | EntityRegistry | registry, |
| str | scope, | ||
| str | category_id | ||
| ) |
Return entries that match a category in a scope.
Definition at line 1468 of file entity_registry.py.
| list[RegistryEntry] homeassistant.helpers.entity_registry.async_entries_for_config_entry | ( | EntityRegistry | registry, |
| str | config_entry_id | ||
| ) |
Return entries that match a config entry.
Definition at line 1483 of file entity_registry.py.
| list[RegistryEntry] homeassistant.helpers.entity_registry.async_entries_for_device | ( | EntityRegistry | registry, |
| str | device_id, | ||
| bool | include_disabled_entities = False |
||
| ) |
Return entries that match a device.
Definition at line 1442 of file entity_registry.py.
| list[RegistryEntry] homeassistant.helpers.entity_registry.async_entries_for_label | ( | EntityRegistry | registry, |
| str | label_id | ||
| ) |
Return entries that match a label.
Definition at line 1460 of file entity_registry.py.
| EntityRegistry homeassistant.helpers.entity_registry.async_get | ( | HomeAssistant | hass | ) |
Get entity registry.
Definition at line 1430 of file entity_registry.py.
| None homeassistant.helpers.entity_registry.async_load | ( | HomeAssistant | hass | ) |
Load entity registry.
Definition at line 1435 of file entity_registry.py.
| None homeassistant.helpers.entity_registry.async_migrate_entries | ( | HomeAssistant | hass, |
| str | config_entry_id, | ||
| Callable[[RegistryEntry], dict[str, Any] | None] | entry_callback | ||
| ) |
Migrate entity registry entries which belong to a config entry. Can be used as a migrator of unique_ids or to update other entity registry data. Can also be used to remove duplicated entity registry entries.
Definition at line 1619 of file entity_registry.py.
| str | None homeassistant.helpers.entity_registry.async_resolve_entity_id | ( | EntityRegistry | registry, |
| str | entity_id_or_uuid | ||
| ) |
Validate and resolve an entity id or UUID to an entity id. Returns None if the entity or UUID is invalid, or if the UUID is not associated with an entity registry item.
Definition at line 1654 of file entity_registry.py.
| str homeassistant.helpers.entity_registry.async_validate_entity_id | ( | EntityRegistry | registry, |
| str | entity_id_or_uuid | ||
| ) |
Validate and resolve an entity id or UUID to an entity id. Raises vol.Invalid if the entity or UUID is invalid, or if the UUID is not associated with an entity registry item.
Definition at line 1640 of file entity_registry.py.
| list[str] homeassistant.helpers.entity_registry.async_validate_entity_ids | ( | EntityRegistry | registry, |
| list[str] | entity_ids_or_uuids | ||
| ) |
Validate and resolve a list of entity ids or UUIDs to a list of entity ids. Returns a list with UUID resolved to entity_ids. Raises vol.Invalid if any item is invalid, or if any a UUID is not associated with an entity registry item.
Definition at line 1670 of file entity_registry.py.
|
private |
Definition at line 79 of file entity_registry.py.
| int homeassistant.helpers.entity_registry.CLEANUP_INTERVAL = 3600 * 24 |
Definition at line 85 of file entity_registry.py.
| tuple homeassistant.helpers.entity_registry.DISPLAY_DICT_OPTIONAL |
Definition at line 150 of file entity_registry.py.
| homeassistant.helpers.entity_registry.ENTITY_CATEGORY_INDEX_TO_VALUE = dict(enumerate(EntityCategory)) |
Definition at line 93 of file entity_registry.py.
| dictionary homeassistant.helpers.entity_registry.ENTITY_DESCRIBING_ATTRIBUTES |
Definition at line 97 of file entity_registry.py.
| homeassistant.helpers.entity_registry.EntityOptionsType |
Definition at line 147 of file entity_registry.py.
| homeassistant.helpers.entity_registry.EventEntityRegistryUpdatedData |
Definition at line 141 of file entity_registry.py.
| int homeassistant.helpers.entity_registry.ORPHANED_ENTITY_KEEP_SECONDS = 3600 * 24 * 30 |
Definition at line 86 of file entity_registry.py.
| homeassistant.helpers.entity_registry.ReadOnlyEntityOptionsType |
Definition at line 148 of file entity_registry.py.
| string homeassistant.helpers.entity_registry.STORAGE_KEY = "core.entity_registry" |
Definition at line 83 of file entity_registry.py.
| int homeassistant.helpers.entity_registry.STORAGE_VERSION_MAJOR = 1 |
Definition at line 81 of file entity_registry.py.
| int homeassistant.helpers.entity_registry.STORAGE_VERSION_MINOR = 15 |
Definition at line 82 of file entity_registry.py.