Skip to content

Commit a1b9491

Browse files
committed
Fix ZHA quirk: cap indicator loop to relays with LEDs
1 parent 75ea8cf commit a1b9491

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

helper_scripts/templates/zha_quirk.py.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ for config in CONFIGS:
345345
attribute_converter = lambda x: {0: "released", 1: "press", 2: "long_press", 3: "position_on", 4: "position_off"}[int(x)]
346346
)
347347
)
348-
for endpoint_id in range(switch_cnt + 1, switch_cnt + indicators_cnt + 1):
348+
for endpoint_id in range(switch_cnt + 1, switch_cnt + min(relay_cnt, indicators_cnt) + 1):
349349
builder = (
350350
builder
351351
.removes(OnOff.cluster_id, cluster_type=ClusterType.Client, endpoint_id=endpoint_id)

0 commit comments

Comments
 (0)