From 977c5b7693697ffe6d685f3370b2cb4f78c3d8ff Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 18 May 2022 14:22:38 +0200 Subject: [PATCH] Cleanup deprecated async_get_registry in gdacs (#72066) --- homeassistant/components/gdacs/geo_location.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/gdacs/geo_location.py b/homeassistant/components/gdacs/geo_location.py index 2b6ffd556a9..5bfbd915b6c 100644 --- a/homeassistant/components/gdacs/geo_location.py +++ b/homeassistant/components/gdacs/geo_location.py @@ -12,9 +12,9 @@ from homeassistant.const import ( LENGTH_MILES, ) 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 homeassistant.util.unit_system import IMPERIAL_SYSTEM from .const import DEFAULT_ICON, DOMAIN, FEED @@ -114,7 +114,7 @@ class GdacsEvent(GeolocationEvent): self._remove_signal_delete() self._remove_signal_update() # Remove from entity registry. - entity_registry = await async_get_registry(self.hass) + entity_registry = er.async_get(self.hass) if self.entity_id in entity_registry.entities: entity_registry.async_remove(self.entity_id)