Skip to content

Commit

Permalink
Merge pull request #153 from lnx85/main
Browse files Browse the repository at this point in the history
Fix media source error in HA 2024.6.3
  • Loading branch information
roleoroleo authored Jun 29, 2024
2 parents 47fd7e5 + 754cc33 commit 69ea1fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/yi_hack/media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
CONF_USERNAME
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import device_registry as dr

from .const import DEFAULT_BRAND, DOMAIN, HTTP_TIMEOUT

Expand Down Expand Up @@ -68,7 +69,7 @@ async def async_browse_media(self, item: MediaSourceItem) -> BrowseMediaSource:
entry_id, event_dir, event_file = async_parse_identifier(item)

if len(self._devices) == 0:
device_registry = self.hass.helpers.device_registry.async_get(self.hass)
device_registry = dr.async_get(self.hass)
for device in device_registry.devices.values():
if device.identifiers is not None:
try:
Expand Down

0 comments on commit 69ea1fd

Please sign in to comment.