Skip to content

Commit

Permalink
Cleanup deprecated async_get_registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Cheatham committed Jun 9, 2022
1 parent 60b415b commit f2e56f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/omada/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def items_added(macs=None):
async_dispatcher_connect(hass, controller.signal_update, items_added)
)

entity_registry = await hass.helpers.entity_registry.async_get_registry()
entity_registry = await hass.helpers.entity_registry.async_get(hass)
initial_set = set()

# Add connected entries
Expand Down Expand Up @@ -173,7 +173,7 @@ def should_poll(self) -> bool:
return False

async def remove(self):
entity_registry = await self.hass.helpers.entity_registry.async_get_registry()
entity_registry = await self.hass.helpers.entity_registry.async_get(self.hass)

await self.async_remove()
entity_registry.async_remove(self.entity_id)
Expand Down Expand Up @@ -314,7 +314,7 @@ def site(self) -> str:
return site

async def remove(self):
entity_registry = await self.hass.helpers.entity_registry.async_get_registry()
entity_registry = await self.hass.helpers.entity_registry.async_get(self.hass)

await self.async_remove()
entity_registry.async_remove(self.entity_id)
Expand Down

0 comments on commit f2e56f5

Please sign in to comment.