Skip to content

Fix setpoint_change_source_timestamp not being initialized#732

Merged
TheJulianJES merged 1 commit intozigpy:devfrom
TheJulianJES:tjj/setpoint_timestamp_missing_zcl_init_attrs
Apr 1, 2026
Merged

Fix setpoint_change_source_timestamp not being initialized#732
TheJulianJES merged 1 commit intozigpy:devfrom
TheJulianJES:tjj/setpoint_timestamp_missing_zcl_init_attrs

Conversation

@TheJulianJES
Copy link
Copy Markdown
Contributor

Proposed change

This adds setpoint_change_source_timestamp to ZCL_INIT_ATTRS for the thermostat cluster.
Otherwise, the "Timestamp" entity will be created for every thermostat, even if the device returns UNSUPPORTED_ATTRIBUTE when it's read.

Additional information

This was missed in:

Copilot AI review requested due to automatic review settings March 30, 2026 21:30
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.63%. Comparing base (696ab1c) to head (11c4c01).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #732   +/-   ##
=======================================
  Coverage   97.63%   97.63%           
=======================================
  Files          62       62           
  Lines       10814    10814           
=======================================
  Hits        10558    10558           
  Misses        256      256           

☔ 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

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

Adds missing thermostat attribute initialization so entity discovery can correctly suppress the “Timestamp” sensor when the device reports the attribute as unsupported.

Changes:

  • Add Thermostat.AttributeDefs.setpoint_change_source_timestamp to ThermostatClusterHandler.ZCL_INIT_ATTRS so it is read during handler initialization and can be marked unsupported early.

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

@TheJulianJES TheJulianJES merged commit bf71279 into zigpy:dev Apr 1, 2026
13 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.

2 participants