Skip to content

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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Conversation

kimtnielsen
Copy link

@kimtnielsen kimtnielsen commented Mar 14, 2025

Proposed change

Additional information

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.00%. Comparing base (62765a4) to head (fee2f33).
Report is 26 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES TheJulianJES added the needs review This PR should be reviewed soon, as it generally looks good. label Mar 26, 2025
@TheJulianJES TheJulianJES added the needs reviewer answer An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state). label Apr 29, 2025
@TheJulianJES TheJulianJES changed the title Add ELIT Scandinavia - IHC Link Quirk for ZHA Add ELIT Scandinavia IHC Link quirk Apr 29, 2025
Comment on lines +43 to +57
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()
Copy link
Collaborator

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

@TheJulianJES TheJulianJES added waiting for reply Waiting for a reply (e.g. to test a custom quirk) and removed needs review This PR should be reviewed soon, as it generally looks good. needs reviewer answer An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state). labels Apr 29, 2025
(
QuirkBuilder(ELIT, "IHC Link")
.device_class(EHCLinkDevice)
.skip_configuration()
Copy link
Collaborator

@TheJulianJES TheJulianJES Apr 29, 2025

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)?

Copy link
Author

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.

@TheJulianJES TheJulianJES removed the waiting for reply Waiting for a reply (e.g. to test a custom quirk) label May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants