-
Notifications
You must be signed in to change notification settings - Fork 839
Add Inovelli VZM32-SN mmWave switch support #4153
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
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #4153 +/- ##
==========================================
+ Coverage 91.28% 91.29% +0.01%
==========================================
Files 339 340 +1
Lines 10967 10998 +31
==========================================
+ Hits 10011 10041 +30
- Misses 956 957 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
We have new APIs for building quirks, clusters, and commands. I think they'll greatly simplify the way your quirk is currently written.
-
For the quirk itself, I think something like this should suffice and will match both variants of your device:
from zigpy.quirks.v2 import QuirkBuilder ( QuirkBuilder("Inovelli", "VZM32-SN") .replaces(InovelliVZM32SNCluster, endpoint_id=1) .replaces(InovelliVZM32SNMMWaveCluster, endpoint_id=1) .device_automation_triggers(INOVELLI_AUTOMATION_TRIGGERS) .add_to_registry() )
-
Our ZCL cluster definition format has changed. Here's an example that rewrites a portion of your cluster definition:
class MMWaveLightOnPresenceBehavior(t.enum8): Option_one = 0x00 Some_other_option = 0x01 class MMwaveControlId(t.enum8): ... class InovelliVZM32SNCluster(InovelliCluster): """Inovelli VZM32-SN custom cluster.""" name = "Inovelli VZM32SN Custom" class AttributeDefs(InovelliCluster.AttributeDefs): dimming_speed_up_local: Final = foundation.ZCLAttributeDef( id=0x0002, type=t.uint8_t, access="rw", is_manufacturer_specific=True, ) # For enum attributes that don't use an enum, please create one with all of the # known values and override the ZCL data type mmwave_light_on_presence_behavior: Final = foundation.ZCLAttributeDef( id=0x006E, zcl_type=foundation.DataTypeId.uint8, type=MMWaveLightOnPresenceBehavior, access="rw", is_manufacturer_specific=True, ) class ServerCommands(foundation.ServerCommandDefs): mmwave_control_command = foundation.ZCLCommandDef( id=0x00, schema={ # If the command schema includes an enumeration, break it out into a new # type "control_id": MMwaveControlId, }, is_manufacturer_specific=True )
@puddly we are actually working with @codyhackw to move everything over to the new format: This is more of an "interim" change to make sure the device is supported when it comes out. |
#3232 is merged now, slated for HA 2025.8.0. |
Proposed change
Add Support for Inovelli VZM32-SN mmWave Switch
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black