diff --git a/custom_components/immich/hub.py b/custom_components/immich/hub.py index 6c58360..b2bd0aa 100644 --- a/custom_components/immich/hub.py +++ b/custom_components/immich/hub.py @@ -116,9 +116,9 @@ async def list_favorite_images(self) -> list[dict]: async with aiohttp.ClientSession() as session: url = urljoin(self.host, "/api/search/metadata") headers = {"Accept": "application/json", _HEADER_API_KEY: self.api_key} - data = {"isFavorite": "true"} + payload = {"isFavorite": True} - async with session.post(url=url, headers=headers, data=data) as response: + async with session.post(url=url, headers=headers, json=payload) as response: if response.status != 200: raw_result = await response.text() _LOGGER.error("Error from API: body=%s", raw_result)