roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browsing yi-hack media source in HA throws error

Failure404 opened this issue · comments

Hi I am experiencing this error when I try to browse yi-hack media files in Home Assistant:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 170, in websocket_browse_media
    media = await async_browse_media(hass, msg.get("media_content_id", ""))
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 121, in async_browse_media
    item = await _get_media_item(hass, media_content_id, None).async_browse()
  File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse
    return await self.async_media_source().async_browse_media(self)
  File "/config/custom_components/yi_hack/media_source.py", line 71, in async_browse_media
    device_registry = await self.hass.helpers.device_registry.async_get()
TypeError: async_get() missing 1 required positional argument: 'hass'
commented

Probably it's a mismatch with the versions.
What version of ha are you using?

Sorry for not mentioning it, I am using 2023.1.2 now and the problem also occured on 2023.1.1.

commented

Now i remember.
The problem is fixed here 9910c44 but not yes released.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.