Skip to content

Conversation

@TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Oct 28, 2025

Proposed change

This no longer exposes the Fahrenheit temperature offset for Third Reality temperature and humidity sensors.

HA should automatically present the unit the user prefers when the temperature device class is set for a temperature entity, which I added in the initial PRs, where the sensors where added, making the additional Fahrenheit entity unnecessary.

For the LCD sensors at least, it makes sense to expose the temperature offset that the device offers, as all template options in HA wouldn't change the temperature displayed on the device.

Why this was merged in the first place

Initially, I thought that this was just a weird device implementation, where the "Fahrenheit offset" only applies to the LCD sensor if it's in "Fahrenheit" mode (can be switched with the side button on the device).
But from the fact that non-LCD sensors also include the Fahrenheit correction and by interpreting more into existing PR descriptions, I think the "Fahrenheit" offset is just to make it easier for the user.

But we don't need to rely on the device doing this with two separate entities, as HA already does this with device classes changing the unit per user preference.

Other change

  • This PR also renames the attributes from "correction" to "offset" to match other quirks. If you were previously using the custom quirks, you might need to delete the old/stale entities.
  • The ThirdRealityTemperatureAndHumidityCluster cluster class is also renamed to ThirdRealityCluster. Both names aren't ideal, but this is a pure manufacturer/private cluster. The latter is at least much shorter.

Additional information

Follow-up to (PRs which added both Celsius and Fahrenheit offset):

Related (soil sensor with similar offset attributes):

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.18%. Comparing base (5a1de36) to head (f5d3e1a).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4442   +/-   ##
=======================================
  Coverage   92.18%   92.18%           
=======================================
  Files         365      365           
  Lines       12001    12001           
=======================================
  Hits        11063    11063           
  Misses        938      938           

☔ 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 TheJulianJES merged commit c9a211d into zigpy:dev Oct 28, 2025
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