Skip to content

Comments

Add exposed feature for SE summation polling#660

Merged
TheJulianJES merged 3 commits intozigpy:devfrom
TheJulianJES:tjj/se_polling_sum_exposed_feature
Feb 25, 2026
Merged

Add exposed feature for SE summation polling#660
TheJulianJES merged 3 commits intozigpy:devfrom
TheJulianJES:tjj/se_polling_sum_exposed_feature

Conversation

@TheJulianJES
Copy link
Contributor

@TheJulianJES TheJulianJES commented Feb 19, 2026

Proposed change

This adds separate entity classes based on an exposed quirks feature/hint, so that the Smart Metering's current_summ_delivered and current_summ_received attributes are polled automatically by ZHA then.

Additional information

The "se_poll_summation" exposed feature will be added to zha-quirks. Then, this PR will be changed to use that exposed feature constant.

Weirdly enough, the Zigbee spec doesn't specify that these two attributes are reportable, yet some devices seem to support it. For the EM cluster, we always poll by default. For the SE cluster, we only poll for select models "TS011F", "ZLinky_TIC", "TICMeter". These can (mostly) be switched to instead expose the polling feature/hint in quirks soon.

Ubisys diagnostics will be added soon. That should be enough to cover these new entities IMO, since the polling is the same and already tested elsewhere. The diagnostics will contain the class name, so check if the exposed feature matching works in this case.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev@75c11d2). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #660   +/-   ##
======================================
  Coverage       ?   97.51%           
======================================
  Files          ?       62           
  Lines          ?    10949           
  Branches       ?        0           
======================================
  Hits           ?    10677           
  Misses         ?      272           
  Partials       ?        0           

☔ 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
Copy link
Contributor Author

This is updated to use a constant for the exposed feature from quirks. Tests will pass with the bump, though diagnostics will need to be regenerated then.

I'll mark this as ready for review, so it's not forgotten about. This is required for Ubisys devices to work properly.
(Having this as an exposed feature also allows us to include this in other quirks to hint that ZHA nedes to poll the SE entities. Right now, we hardcode some models in ZHA.)

@TheJulianJES TheJulianJES marked this pull request as ready for review February 24, 2026 23:23
@TheJulianJES TheJulianJES force-pushed the tjj/se_polling_sum_exposed_feature branch from d8f2905 to 0d6f27a Compare February 25, 2026 06:19
@TheJulianJES
Copy link
Contributor Author

I'll add all the Ubisys diagnostics in a follow-up PR in the next few days. It's not critical for the release.

@TheJulianJES TheJulianJES merged commit 229df22 into zigpy:dev Feb 25, 2026
9 checks passed
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.

1 participant