koying / openrgb_ha

OpenRGB integration for Home Assistant
110 stars 16 forks source link

Exception in _delete_callback when dispatching 'openrgb_delete' #38

Open felipecrs opened 5 months ago

felipecrs commented 5 months ago

Found this in my logs and it doesn't seem to be reported already.

2024-05-24 12:54:41.962 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'openrgb' accesses hass.helpers.entity_registry. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from entity_registry directly at custom_components/openrgb/light.py, line 231: await self.hass.helpers.entity_registry.async_get_registry(), please create a bug report at https://github.com/koying/openrgb_ha/issues
2024-05-24 12:54:42.006 ERROR (MainThread) [homeassistant.util.logging] Exception in _delete_callback when dispatching 'openrgb_delete': ('light.g502_hero_gaming_mouse_5',)
Traceback (most recent call last):
  File "/config/custom_components/openrgb/light.py", line 231, in _delete_callback
    await self.hass.helpers.entity_registry.async_get_registry()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1500, in __getattr__
    value = getattr(self._module, attr)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'homeassistant.helpers.entity_registry' has no attribute 'async_get_registry'