Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix media source error in HA 2024.6.3 #153

Merged
merged 1 commit into from
Jun 29, 2024
Merged

Conversation

lnx85
Copy link
Contributor

@lnx85 lnx85 commented Jun 17, 2024

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 187, 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 135, 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 80, 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 = self.hass.helpers.device_registry.async_get(self.hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: async_get() takes 1 positional argument but 2 were given

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 187, 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 135, 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 80, 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 = self.hass.helpers.device_registry.async_get(self.hass)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: async_get() takes 1 positional argument but 2 were given
@roleoroleo
Copy link
Owner

Thank you for your pr.

@roleoroleo roleoroleo merged commit 69ea1fd into roleoroleo:main Jun 29, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants