Skip to content

Clean up default reporting config errors#711

Merged
puddly merged 2 commits intozigpy:devfrom
puddly:puddly/attribute-reporting-fixes
Mar 17, 2026
Merged

Clean up default reporting config errors#711
puddly merged 2 commits intozigpy:devfrom
puddly:puddly/attribute-reporting-fixes

Conversation

@puddly
Copy link
Copy Markdown
Contributor

@puddly puddly commented Mar 17, 2026

I ran into a few errors in our default reporting config:

  1. BinaryInput, BinaryOutput, and BinaryValue should use REPORT_CONFIG_IMMEDIATE, not REPORT_CONFIG_DEFAULT.
  2. The various state and mode Thermostat cluster attributes should use a discrete reporting config, since the "minimum change" will be ignored.

Copilot AI review requested due to automatic review settings March 17, 2026 22:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts ZHA’s default attribute reporting configurations to better match the semantics of discrete vs analog attributes, avoiding misconfiguration and related runtime errors when configuring reporting on devices.

Changes:

  • Switch Thermostat discrete “mode/state” attributes to a discrete reporting config (instead of analog “minimum change” configs).
  • Use REPORT_CONFIG_IMMEDIATE for BinaryInput/BinaryOutput/BinaryValue present_value reporting (instead of REPORT_CONFIG_DEFAULT).

Reviewed changes

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

File Description
zha/zigbee/cluster_handlers/hvac.py Updates Thermostat running_mode, running_state, system_mode (and related discrete attrs) to use a discrete reporting tuple.
zha/zigbee/cluster_handlers/general.py Changes BinaryInput/BinaryOutput/BinaryValue present_value reporting to REPORT_CONFIG_IMMEDIATE.

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

You can also share your feedback on Copilot code review. Take the survey.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.62%. Comparing base (c51efa5) to head (9e55def).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #711      +/-   ##
==========================================
+ Coverage   97.51%   97.62%   +0.11%     
==========================================
  Files          62       62              
  Lines       10946    10951       +5     
==========================================
+ Hits        10674    10691      +17     
+ Misses        272      260      -12     

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

Copy link
Copy Markdown
Contributor

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

Looks good.

It will be fun to automatically re-set up reporting for all/affected existing devices, if we ever do that.. 😅

@puddly puddly merged commit cc57394 into zigpy:dev Mar 17, 2026
13 checks passed
@puddly puddly deleted the puddly/attribute-reporting-fixes branch March 17, 2026 23:07
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