From 61a3930cbfa4751f4ca961d8eaff8359f8e21f92 Mon Sep 17 00:00:00 2001 From: Sisylam <32327835+Sisylam@users.noreply.github.com> Date: Sun, 8 Dec 2024 23:20:28 +0100 Subject: [PATCH] Update device.py Fix issue on sending IasAce:arm_response which does not return a tuple but only a single state but in general to be more fail tolerante as we can't always guarantee the result from the multitude of Zigbee devices --- zha/zigbee/device.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zha/zigbee/device.py b/zha/zigbee/device.py index c1a2c3b80..f97a0a02a 100644 --- a/zha/zigbee/device.py +++ b/zha/zigbee/device.py @@ -955,6 +955,9 @@ async def issue_cluster_command( return # client commands don't return a response if isinstance(response, Exception): raise ZHAException("Failed to issue cluster command") from response + if not isinstance(response, tuple) or len(response) < 2: + _LOGGER.warning("Received unknown/unsupported response: %s", response) + return # ignore this response instead of failing if response[1] is not ZclStatus.SUCCESS: raise ZHAException( f"Failed to issue cluster command with status: {response[1]}"