schmittx / home-assistant-eero

Eero integration for Home Assistant
MIT License
118 stars 23 forks source link

HA Integration is using deprecated async_get_registry #36

Closed jeffalperin closed 1 year ago

jeffalperin commented 2 years ago

Seeing this warning in Home Assistant logs:

Logger: homeassistant.helpers.frame Source: helpers/frame.py:103

Detected integration that uses deprecated async_get_registry to access device registry, use async_get instead. Please report issue to the custom component author for eero using this method at custom_components/eero/init.py, line 149: device_registry = await hass.helpers.device_registry.async_get_registry() Detected integration that uses deprecated async_get_registry to access entity registry, use async_get instead. Please report issue to the custom component author for eero using this method at custom_components/eero/init.py, line 150: entity_registry = await hass.helpers.entity_registry.async_get_registry()

villamanuel1980 commented 2 years ago

I'm having this same problem. Do we know if scmittx intends to keep this integration alive? Thanks!

villamanuel1980 commented 2 years ago

So.. mine is working again and I have no idea why. Did this happen to you too?

jeffalperin commented 2 years ago

Mine never stopped working, but I saw the error message in the logs.

briandonahue commented 2 years ago

This does seem to be a deprecation warning and not an actual error that will break the integration, so for now it's not a huge emergency, but when they remove it officially it will probably break.

I blindly took a stab at it after a brief visit to the developer docs, but it doesn't seem to be as simple as I thought. First I just changed the method call, then it said I could not await it so I removed the await.

Started seeing other errors. May give it another go with a more serious dev setup (I just tweaked and ran on my own HA instance, rather than actually set up a dev environment). But it seems it will take actually understanding what is changing to fix it. 😄 https://github.com/schmittx/home-assistant-eero/compare/main...briandonahue:home-assistant-eero:main?expand=1#diff-5b3902b02d0d1a2151ef65550f2da8c11cc9d55d9ac900c74c72e781bd0e233b

schmittx commented 1 year ago

Fixed in 1.2.0