Skip to content

Conversation

@elupus
Copy link
Contributor

@elupus elupus commented Dec 3, 2025

  • Add event platform client clusters
  • Add LevelContro, On/Off, Color events for client clusters
  • Enabled handling of ClientClusterHandlers
  • Corrects naming of client cluster handlers

Depends on home-assistant/core#157853 for support in HA

@elupus elupus marked this pull request as draft December 3, 2025 14:57
@elupus
Copy link
Contributor Author

elupus commented Dec 3, 2025

Just noticed that #419 exists too. I think this is simpler and stands on the main standardized clusters.

- Add event entities for LevelControl client clusters
- Adjust registries to support ClientCluster handlers
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 98.14815% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.09%. Comparing base (7d24475) to head (79f4880).
⚠️ Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
zha/application/platforms/event.py 96.96% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #594      +/-   ##
==========================================
+ Coverage   96.98%   97.09%   +0.10%     
==========================================
  Files          63       64       +1     
  Lines       10559    10661     +102     
==========================================
+ Hits        10241    10351     +110     
+ Misses        318      310       -8     

☔ 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.

@elupus
Copy link
Contributor Author

elupus commented Dec 3, 2025

Btw. I've explicitly avoided some fixed structure here. Tried to keep the original cluster commands as is. Currently HA has very few devices classes for events, so the structure of the event data there has not given correct structure.

Given the above situation, inventing some in-between structure that isn't 1 to 1 mapped to zigbee spec seem pointless and only adds complexity.

@elupus elupus marked this pull request as ready for review December 3, 2025 15:46
yield from self._handle_single_output_clusters(endpoint)
else:
# until we can get rid of registries
yield from self.handle_on_off_output_cluster_exception(endpoint)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand this weird cluster exception here. It seems to add extra cluster handler at this stage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from 2019. The more we delete from discovery.py the better 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Will look at it after goes in. I'd rather not make this larger than it is. The split of input/output handler is no longer required since the client cluster handlers have names and id's that separate them from server side. So this stuff can be simplified.

But I'd rather avoid making this larger than it already is, given how hard the test fixtures are to review.

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