Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup deprecated async_get_registry in gdacs #72066

Merged
merged 1 commit into from May 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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