Skip to content

Commit

Permalink
Cleanup deprecated async_get_registry in gdacs (#72066)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed May 18, 2022
1 parent 4978d5f commit 977c5b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/gdacs/geo_location.py
Expand Up @@ -12,9 +12,9 @@
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
Expand Down Expand Up @@ -114,7 +114,7 @@ async def async_will_remove_from_hass(self) -> None:
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)

Expand Down

0 comments on commit 977c5b7

Please sign in to comment.