Skip to content

Commit ad0dc81

Browse files
authored
Fix replacing Inovelli VZM35-SN clusters (#4226)
Always add endpoint 3 and Inovelli output clusters on ep 2 and 3 to produce button press events
1 parent a5670a6 commit ad0dc81

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

zhaquirks/inovelli/VZM35SN.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
from zigpy.profiles import zha
44
from zigpy.quirks.v2 import QuirkBuilder
5+
from zigpy.zcl import ClusterType
56

67
from zhaquirks.inovelli import INOVELLI_AUTOMATION_TRIGGERS, InovelliVZM35SNCluster
78

89
(
910
QuirkBuilder("Inovelli", "VZM35-SN")
1011
.replaces_endpoint(1, device_type=zha.DeviceType.DIMMABLE_LIGHT)
1112
.replace_cluster_occurrences(InovelliVZM35SNCluster)
12-
.replaces(InovelliVZM35SNCluster, endpoint_id=2)
13-
.replaces(InovelliVZM35SNCluster, endpoint_id=3)
13+
# ep 3 is missing in zigpy DB for devices paired with an old fw version, add it:
14+
.replaces_endpoint(3, device_type=zha.DeviceType.DIMMER_SWITCH)
15+
# these missing clusters are needed for button presses to generate events:
16+
.replaces(InovelliVZM35SNCluster, endpoint_id=2, cluster_type=ClusterType.Client)
17+
.replaces(InovelliVZM35SNCluster, endpoint_id=3, cluster_type=ClusterType.Client)
1418
.device_automation_triggers(INOVELLI_AUTOMATION_TRIGGERS)
1519
.add_to_registry()
1620
)

0 commit comments

Comments
 (0)