From 453f7d74b3ce8d930c04e57134ecc285beecf88e Mon Sep 17 00:00:00 2001 From: mdeweerd Date: Mon, 30 Dec 2024 15:10:38 +0100 Subject: [PATCH] Ignore some mypy notices --- custom_components/zha_toolkit/zcl_attr.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_components/zha_toolkit/zcl_attr.py b/custom_components/zha_toolkit/zcl_attr.py index 596506c..811a961 100644 --- a/custom_components/zha_toolkit/zcl_attr.py +++ b/custom_components/zha_toolkit/zcl_attr.py @@ -548,9 +548,12 @@ async def attr_write( # noqa: C901 # Write value to provided state or state attribute if params[p.STATE_ID] is not None: - if len(result_read[1]) == 0 and len(result_read[0]) == 1: + if ( + len(result_read[1]) == 0 # type:ignore[index] + and len(result_read[0]) == 1 # type:ignore[index] + ): # No error and one result - for attr_id, val in result_read[0].items(): + for attr_id, val in result_read[0].items(): # type:ignore[index] if state_template_str is not None: if val is None: LOGGER.debug(