Skip to content

Conversation

@3reality-support
Copy link
Contributor

@3reality-support 3reality-support commented Oct 10, 2025

Proposed change

This PR added adaptation code for T_H sensor lite and added 3 additional private clusters

  1. temperature_correction_fahrenheit: Calibrate Fahrenheit
  2. temperature_correction_celsius: Calibrate Celsius
  3. humidity_correction: Calibrate humidity

Additional information

10ffc084fc46bc38d2395d562f68b406

Device diagnostics

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 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.17%. Comparing base (500e74e) to head (00b256b).
⚠️ Report is 10 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4387      +/-   ##
==========================================
+ Coverage   92.12%   92.17%   +0.04%     
==========================================
  Files         358      364       +6     
  Lines       11917    11992      +75     
==========================================
+ Hits        10979    11054      +75     
  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 added the manufacturer This request was made by the device's manufacturer label Oct 10, 2025
Copy link
Collaborator

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

This can be combined with the quirk from #4386.
The PollControl cluster can be removed in a separate quirk which clones the main quirk for all the functionality. I'll merge these PRs separately for now, but I'll tag you in a PR where I merge these later.

Comment on lines +46 to +47
min_value=-10000,
max_value=10000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a bit much to allow for?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can just use mode="box" if you always want to force a box, instead of a slider in the HA UI.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I didn't notice the multiplier=0.01. This is likely fine then.

from zigpy.zcl.foundation import BaseAttributeDefs, ZCLAttributeDef


class ThirdRealityTemperatureAndHumidityCluster(CustomCluster):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll likely shorten this class name a bit in a follow-up PR, where I can go over all of the added Third Reality quirks.

Comment on lines +46 to +47
min_value=-10000,
max_value=10000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I didn't notice the multiplier=0.01. This is likely fine then.

@TheJulianJES TheJulianJES changed the title Add Third Reality T_H sensor lite settings Add Third Reality temperature and humidity sensor lite settings Oct 28, 2025
@TheJulianJES TheJulianJES merged commit 8339de1 into zigpy:dev Oct 28, 2025
9 checks passed
@TheJulianJES
Copy link
Collaborator

The same question in #4380 also applies to this device/quirk.
Please answer in the linked PR (soil sensor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manufacturer This request was made by the device's manufacturer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants