Skip to content

Commit

Permalink
Updates for Inovelli VZM31-SN (#1649)
Browse files Browse the repository at this point in the history
* Updates for Inovelli VZM31-SN

Signature changes with firmware v1.11 and an update to the init file for an additional configuration parameter added.

* Update __init__.py
  • Loading branch information
codyhackw committed Jul 24, 2022
1 parent 4b65304 commit d709387
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
89 changes: 89 additions & 0 deletions zhaquirks/inovelli/VZM31SN.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,95 @@
WWAH_CLUSTER_ID = 64599


class InovelliVZM31SNv11(CustomDevice):
"""VZM31-SN 2 in 1 Switch/Dimmer Module."""

signature = {
MODELS_INFO: [("Inovelli", "VZM31-SN")],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: DeviceType.DIMMABLE_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id, # 0
Identify.cluster_id, # 3
Groups.cluster_id, # 4
Scenes.cluster_id, # 5
OnOff.cluster_id, # 6
LevelControl.cluster_id, # 8
Metering.cluster_id, # 1794
ElectricalMeasurement.cluster_id, # 2820
Diagnostic.cluster_id, # 2821
INOVELLI_VZM31SN_CLUSTER_ID, # 64561
WWAH_CLUSTER_ID, # 64599
],
OUTPUT_CLUSTERS: [Ota.cluster_id], # 19
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [Basic.cluster_id, Identify.cluster_id], # 0 # 3
OUTPUT_CLUSTERS: [
Identify.cluster_id, # 3
OnOff.cluster_id, # 6
LevelControl.cluster_id, # 8
INOVELLI_VZM31SN_CLUSTER_ID, # 64561
],
},
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 0x0061,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [0x0021],
},
},
}

replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: DeviceType.DIMMABLE_LIGHT,
INPUT_CLUSTERS: [
Basic, # 0
Identify, # 3
Groups, # 4
Scenes, # 5
OnOff, # 6
LevelControl, # 8
Metering, # 1794
ElectricalMeasurement, # 2820
Diagnostic, # 2821
Inovelli_VZM31SN_Cluster, # 64561
WWAH_CLUSTER_ID, # 64599
],
OUTPUT_CLUSTERS: [
Ota, # 19
],
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [Basic, Identify], # 0 # 3
OUTPUT_CLUSTERS: [
Identify, # 3
OnOff, # 6
LevelControl, # 8
Inovelli_VZM31SN_Cluster, # 64561
],
},
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 0x0061,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [0x0021],
},
},
}

device_automation_triggers = INOVELLI_AUTOMATION_TRIGGERS


class InovelliVZM31SNv10(CustomDevice):
"""VZM31-SN 2 in 1 Switch/Dimmer Module."""

Expand Down
1 change: 1 addition & 0 deletions zhaquirks/inovelli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class Inovelli_VZM31SN_Cluster(CustomCluster):
0x0102: ("output_mode", t.Bool, True),
0x0103: ("on_off_led_mode", t.Bool, True),
0x0104: ("firmware_progress_led", t.Bool, True),
0x0105: ("relay_click_in_on_off_mode", t.Bool, True),
}
)

Expand Down

0 comments on commit d709387

Please sign in to comment.