Skip to content

Commit

Permalink
Ignore some mypy notices
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Dec 30, 2024
1 parent e039849 commit 453f7d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/zha_toolkit/zcl_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 453f7d7

Please sign in to comment.