Adjust entity registry access in integrations (3) (#88948)

This commit is contained in:
epenet 2023-03-01 08:24:56 +01:00 committed by GitHub
parent f69d76702a
commit 42b74e7f56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 90 additions and 93 deletions

View file

@ -8,7 +8,7 @@ from homeassistant.const import (
ATTR_LONGITUDE,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import device_registry
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -44,7 +44,7 @@ async def async_setup_entry(
] = async_dispatcher_connect(hass, TRACKER_UPDATE, _receive_data)
# Restore previously loaded devices
dev_reg = device_registry.async_get(hass)
dev_reg = dr.async_get(hass)
dev_ids = {
identifier[1]
for device in dev_reg.devices.values()