Cleanup deprecated async_get_registry in sense (#72074)

This commit is contained in:
epenet 2022-05-18 13:53:57 +02:00 committed by GitHub
parent b9c84bd655
commit 9c4a046a2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,9 +8,9 @@ from homeassistant.components.binary_sensor import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ATTRIBUTION
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_registry import async_get_registry
from .const import (
ATTRIBUTION,
@ -50,7 +50,7 @@ async def async_setup_entry(
async def _migrate_old_unique_ids(hass, devices):
registry = await async_get_registry(hass)
registry = er.async_get(hass)
for device in devices:
# Migration of old not so unique ids
old_entity_id = registry.async_get_entity_id(