Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Inovelli VZM31-SN #1649

Merged
merged 2 commits into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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