From f317b15523525856db10c94e943fe8f9fc4f9411 Mon Sep 17 00:00:00 2001 From: Daan Sieben Date: Thu, 9 May 2024 15:20:45 +0200 Subject: [PATCH] fix: Error calling next_media after core update 2024.5.0 #48 --- custom_components/google_photos/camera.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/google_photos/camera.py b/custom_components/google_photos/camera.py index a6e0be7..e821832 100644 --- a/custom_components/google_photos/camera.py +++ b/custom_components/google_photos/camera.py @@ -130,9 +130,9 @@ def _handle_coordinator_update(self) -> None: ) self.async_write_ha_state() - def next_media(self, mode=None): + async def next_media(self, mode=None): """Load the next media.""" - self.hass.async_add_job(self.coordinator.select_next(mode)) + await self.coordinator.select_next(mode) async def async_camera_image( self, width: int | None = None, height: int | None = None