diff --git a/blinkpy/helpers/constants.py b/blinkpy/helpers/constants.py index a5c1ec02..2a557db0 100644 --- a/blinkpy/helpers/constants.py +++ b/blinkpy/helpers/constants.py @@ -4,7 +4,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 16 -PATCH_VERSION = "0-rc7" +PATCH_VERSION = "0-rc8" __version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}" diff --git a/blinkpy/sync_module.py b/blinkpy/sync_module.py index 07a7c146..b1dad592 100644 --- a/blinkpy/sync_module.py +++ b/blinkpy/sync_module.py @@ -171,7 +171,7 @@ def get_camera_info(self, camera_id, **kwargs): return response["camera"][0] except (TypeError, KeyError): _LOGGER.error("Could not extract camera info: %s", response, exc_info=True) - return [] + return {} def get_network_info(self): """Retrieve network status.""" @@ -191,7 +191,9 @@ def refresh(self, force_cache=False): self.check_new_videos() for camera_name in self.cameras.keys(): camera_id = self.cameras[camera_name].camera_id - camera_info = self.get_camera_info(camera_id) + camera_info = self.get_camera_info( + camera_id, owl_info=self.get_owl_info(camera_name) + ) self.cameras[camera_name].update(camera_info, force_cache=force_cache) self.available = True diff --git a/tests/test_sync_module.py b/tests/test_sync_module.py index 211cdb4b..fc18a51e 100644 --- a/tests/test_sync_module.py +++ b/tests/test_sync_module.py @@ -80,11 +80,11 @@ def test_get_camera_info(self, mock_resp): def test_get_camera_info_fail(self, mock_resp): """Test handling of failed get camera info function.""" mock_resp.return_value = None - self.assertEqual(self.blink.sync["test"].get_camera_info("1"), []) + self.assertEqual(self.blink.sync["test"].get_camera_info("1"), {}) mock_resp.return_value = {} - self.assertEqual(self.blink.sync["test"].get_camera_info("1"), []) + self.assertEqual(self.blink.sync["test"].get_camera_info("1"), {}) mock_resp.return_value = {"camera": None} - self.assertEqual(self.blink.sync["test"].get_camera_info("1"), []) + self.assertEqual(self.blink.sync["test"].get_camera_info("1"), {}) def test_get_network_info(self, mock_resp): """Test network retrieval."""