Skip to content

Fix configure_reporting_multiple not returning responses#1764

Merged
puddly merged 7 commits into
zigpy:devfrom
TheJulianJES:tjj/fix_reporting_return
Feb 9, 2026
Merged

Fix configure_reporting_multiple not returning responses#1764
puddly merged 7 commits into
zigpy:devfrom
TheJulianJES:tjj/fix_reporting_return

Conversation

@TheJulianJES

@TheJulianJES TheJulianJES commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Proposed change

This PR fixes numerous issues in the configure_reporting_multiple method:

  • The reporting_results are now correctly added to the results list that's returned at the end.
  • Partial failures now cause other attributes to be syntactically added with a SUCCESS status.
  • The method is now more similar to write_attributes.
  • Test coverage is improved, including for partial failures.

Additional information

Seen in:

Related:

@TheJulianJES TheJulianJES marked this pull request as ready for review February 7, 2026 20:29
Copilot AI review requested due to automatic review settings February 7, 2026 20:29
@codecov

codecov Bot commented Feb 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (b2ee3c3) to head (b8d8a2d).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1764   +/-   ##
=======================================
  Coverage   99.51%   99.51%           
=======================================
  Files          63       63           
  Lines       12676    12680    +4     
=======================================
+ Hits        12615    12619    +4     
  Misses         61       61           

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Cluster.configure_reporting_multiple() so it returns per-attribute response records instead of always returning an empty list, aligning the method’s behavior with callers’ expectations and the PR description.

Changes:

  • Append each manufacturer-group’s reporting_results into the final results list returned by configure_reporting_multiple().
  • Update existing tests to capture and assert the returned result list length/statuses for several response scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
zigpy/zcl/__init__.py Extends the returned results with the response records computed per manufacturer code group.
tests/test_zcl.py Updates tests to assert configure_reporting_multiple() returns a result per configured attribute (in covered scenarios).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread zigpy/zcl/__init__.py
Comment thread tests/test_zcl.py
@TheJulianJES TheJulianJES marked this pull request as draft February 7, 2026 20:42
Comment thread zigpy/zcl/__init__.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TheJulianJES

Copy link
Copy Markdown
Contributor Author

The method is now pretty similar to write_attributes.

I think we're still missing test coverage for combined manufacturer code calls both for write_attributes and configure_reporting_multiple. We should add that in another PR.

@TheJulianJES TheJulianJES marked this pull request as ready for review February 7, 2026 21:19
@puddly puddly merged commit 5abb484 into zigpy:dev Feb 9, 2026
18 checks passed
mineshaftgap pushed a commit to mineshaftgap/zigpy that referenced this pull request Jun 11, 2026
* Fix `configure_reporting_multiple` not returning reporting responses

* Check returned list in tests

* Fix return for partial failures missing successful configs

* Fix return for partial failure with `attrid` set causing global success

* Align with `write_attributes` for order and only include attributes we requested

* Align with `write_attributes` to use generator

* Update tests
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.

3 participants