Adjust entity registry access in integrations (1) (#88946)

This commit is contained in:
epenet 2023-03-01 08:02:34 +01:00 committed by GitHub
parent f2b736fad0
commit b3d6f098d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 61 additions and 79 deletions

View file

@ -9,7 +9,7 @@ from typing import Any
from homeassistant.backports.enum import StrEnum
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
@ -55,7 +55,7 @@ def async_finish_entity_domain_replacements(
entity_replacement_strategies: Iterable[EntityDomainReplacementStrategy],
) -> None:
"""Remove old entities and create a repairs issue with info on their replacement."""
ent_reg = entity_registry.async_get(hass)
ent_reg = er.async_get(hass)
for strategy in entity_replacement_strategies:
try:
[registry_entry] = [