From f38506b4965196b6fcb46e9f6927e06e75796acd Mon Sep 17 00:00:00 2001 From: Harvey Pham Date: Thu, 8 Aug 2024 22:08:40 -0700 Subject: [PATCH 1/2] Fix arguments to wait_for_command in request_camera_liveview --- blinkpy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blinkpy/api.py b/blinkpy/api.py index 95dc280b..2cd3322f 100644 --- a/blinkpy/api.py +++ b/blinkpy/api.py @@ -328,7 +328,7 @@ async def request_camera_liveview(blink, network, camera_id): f"/networks/{network}/cameras/{camera_id}/liveview" ) response = await http_post(blink, url) - await wait_for_command(blink, response) + await wait_for_command(blink, {"id": response["command_id"], "network_id": network}) return response From 0f5293497be8e6ece2f76de07be45d133f04551b Mon Sep 17 00:00:00 2001 From: Harvey Pham Date: Thu, 8 Aug 2024 23:12:01 -0700 Subject: [PATCH 2/2] Some model return "id" instead of "command_id" --- blinkpy/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blinkpy/api.py b/blinkpy/api.py index 2cd3322f..47a6e3a7 100644 --- a/blinkpy/api.py +++ b/blinkpy/api.py @@ -328,7 +328,8 @@ async def request_camera_liveview(blink, network, camera_id): f"/networks/{network}/cameras/{camera_id}/liveview" ) response = await http_post(blink, url) - await wait_for_command(blink, {"id": response["command_id"], "network_id": network}) + command_id = response.get("id") or response.get("command_id") + await wait_for_command(blink, {"id": command_id, "network_id": network}) return response