Adjust entity registry access in integrations (2) (#88947)
This commit is contained in:
parent
b3d6f098d2
commit
f69d76702a
20 changed files with 62 additions and 66 deletions
|
@ -39,7 +39,7 @@ from homeassistant.const import (
|
|||
from homeassistant.core import CoreState, HomeAssistant, callback
|
||||
from homeassistant.helpers import (
|
||||
config_validation as cv,
|
||||
device_registry,
|
||||
device_registry as dr,
|
||||
entity_platform,
|
||||
)
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
|
@ -407,7 +407,7 @@ class KodiEntity(MediaPlayerEntity):
|
|||
|
||||
version = (await self._kodi.get_application_properties(["version"]))["version"]
|
||||
sw_version = f"{version['major']}.{version['minor']}"
|
||||
dev_reg = device_registry.async_get(self.hass)
|
||||
dev_reg = dr.async_get(self.hass)
|
||||
device = dev_reg.async_get_device({(DOMAIN, self.unique_id)})
|
||||
dev_reg.async_update_device(device.id, sw_version=sw_version)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue