-
Notifications
You must be signed in to change notification settings - Fork 796
Add ELIT Scandinavia IHC Link quirk #3961
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3961 +/- ##
=======================================
Coverage 91.00% 91.00%
=======================================
Files 328 328
Lines 10656 10656
=======================================
Hits 9698 9698
Misses 958 958 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
async def apply_custom_configuration(self, *args, **kwargs): | ||
"""Apply custom configuration to device. Bind multistate input cluster and configure reporting.""" | ||
for endpoint in self.endpoints.values(): | ||
if isinstance(endpoint, ZDO): | ||
continue | ||
cluster = endpoint.in_clusters.get(MultistateInput.cluster_id) | ||
if cluster: | ||
await cluster.bind() | ||
await cluster.configure_reporting( | ||
MultistateInput.AttributeDefs.present_value.id, 0, 0, 0 | ||
) | ||
|
||
cluster = endpoint.in_clusters.get(OnOff.cluster_id) | ||
if cluster: | ||
await cluster.bind() |
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.
Is binding and manually configuring reporting really required here?
We already bind the MultistateInput
cluster by default and set up reporting for the present_value
attribute in ZHA: https://github.com/zigpy/zha/blob/695475a927451524475bdcef90a25177727e2345/zha/zigbee/cluster_handlers/general.py#L383-L392
( | ||
QuirkBuilder(ELIT, "IHC Link") | ||
.device_class(EHCLinkDevice) | ||
.skip_configuration() |
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.
Ah, I see you're skipping the ZHA configuration here. I don't think we should do that.
Can you provide the full device signature to see if there are any clusters that perhaps shouldn't be bound (which I'm guessing this is why you've added this)?
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.
Yes, there are really many endpoints (34 endpoints in worst case) and therefore we have to skip the automatic bindings, otherwise the device will work very slow and in some cases the binding table runs full. For the endpoints with MultistateInput, only this attribute needs binding.
This device enables/disables endpoints when it powered up the first time (is static after joining), depending on what is connected to it wired databusses. So it can have either 32 input endpoints, or 16 inputs + 8 outputs, or 16 outputs.
Proposed change
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black