diff --git a/custom_components/google_photos/config_flow.py b/custom_components/google_photos/config_flow.py index c1f540a..729d36c 100644 --- a/custom_components/google_photos/config_flow.py +++ b/custom_components/google_photos/config_flow.py @@ -140,7 +140,7 @@ def get_albums() -> List[Album]: .execute() ) album_list = album_list + result["albums"] - return album_list + return list(filter(lambda a: ("id" in a and "title" in a), album_list)) albums = await self.hass.async_add_executor_job(get_albums) album_selection = dict({CONF_ALBUM_ID_FAVORITES: "Favorites"}) diff --git a/custom_components/google_photos/coordinator.py b/custom_components/google_photos/coordinator.py index d5d2a18..fe49711 100644 --- a/custom_components/google_photos/coordinator.py +++ b/custom_components/google_photos/coordinator.py @@ -152,7 +152,7 @@ def get_device_info(self) -> DeviceInfo: }, manufacturer=MANUFACTURER, name="Google Photos - " + self.album.get("title"), - configuration_url=self.album.get("productUrl"), + configuration_url=self.album.get("productUrl", None), ) def set_context(self, context: dict[str, str | int]):