StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
616 stars 111 forks source link

[BUG] deprecated `async_get_registry` #679

Open supergroover opened 2 years ago

supergroover commented 2 years ago

Environment

Describe the bug

After updating core to 2022.6 and 2022.6.1 i get this error in the log. The shelly switches seems to work fine. The shortcut in the sidebar keeps loading (see screenshot)

Steps to Reproduce

Expected behavior

Screenshots

image

Traceback/Error logs

2022-06-03 09:43:46 WARNING (MainThread) [homeassistant.helpers.frame] 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 shelly using this method at custom_components/shelly/__init__.py, line 344: await self.hass.helpers.entity_registry.async_get_registry()

Additional context

bcutter commented 2 years ago

The not loading configuration page issue is another one, see here (fixed by updating to v1.0.0 of the integration): https://github.com/StyraHem/ShellyForHASS/issues/681

This issue is about the error log I can confirm with integration version v1.0.0 running latest HA 2022.6.2:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 19:54:01 (1 occurrences)
Last logged: 19:54:01

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 shelly using this method at custom_components/shelly/__init__.py, line 356: await self.hass.helpers.entity_registry.async_get_registry()
hakana commented 2 years ago

I will fix this in next release, I released 1.0.0 to fix the more critical release with configuration just loading.

giadamosi commented 1 year ago

This bug is still there, any fix?

safehome-jdev commented 1 year ago

Created a pull for fix 🤞🏼

Senbei123 commented 1 year ago

Please approve the PR!