From 4736bf3c323725293365e7451418c9f02ac5fba3 Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Wed, 20 Oct 2021 13:03:52 +0200 Subject: [PATCH] Don't use deprecated ways of retrieving registries in Axis (#58083) --- homeassistant/components/axis/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/axis/device.py b/homeassistant/components/axis/device.py index 90eacf47965..93d90e93fe2 100644 --- a/homeassistant/components/axis/device.py +++ b/homeassistant/components/axis/device.py @@ -23,6 +23,7 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady +from homeassistant.helpers import device_registry as dr from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.httpx_client import get_async_client @@ -168,7 +169,7 @@ class AxisNetworkDevice: async def async_update_device_registry(self): """Update device registry.""" - device_registry = await self.hass.helpers.device_registry.async_get_registry() + device_registry = dr.async_get(self.hass) device_registry.async_get_or_create( config_entry_id=self.config_entry.entry_id, connections={(CONNECTION_NETWORK_MAC, self.unique_id)},