From e53cf5a1297833730bdc70be98cc164eadbd7a1a Mon Sep 17 00:00:00 2001 From: Timo Christeleit Date: Fri, 17 Jan 2025 08:47:15 +0100 Subject: [PATCH] fix for firmware update of D230 --- custom_components/tapo_control/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/tapo_control/utils.py b/custom_components/tapo_control/utils.py index e365354..27e4809 100644 --- a/custom_components/tapo_control/utils.py +++ b/custom_components/tapo_control/utils.py @@ -1381,7 +1381,12 @@ async def getCamData(hass, controller): camData["updated"] = datetime.datetime.utcnow().timestamp() try: - camData['quick_response'] = data['getQuickRespList']['quick_resp_audio'] + if isinstance(data['getQuickRespList'], list): + camData['quick_response'] = data['getQuickRespList'][0]['quick_response']['quick_resp_audio'] + elif isinstance(data['getQuickRespList'], dict): + camData['quick_response'] = data['getQuickRespList']['quick_resp_audio'] + else: + LOGGER.warning("Quick response data is not in expected format") except Exception: camData['quick_response'] = None