-
Notifications
You must be signed in to change notification settings - Fork 796
Add temperature and humidity calibration to Sonoff SNZB-02D #3989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
dc10e56
to
e4b396e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3989 +/- ##
=======================================
Coverage 91.19% 91.20%
=======================================
Files 335 335
Lines 10886 10888 +2
=======================================
+ Hits 9928 9930 +2
Misses 958 958 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, any issues with this PR still, since it's still in draft? Seems like it should work for the most part.
zhaquirks/sonoff/snzb02d.py
Outdated
min_value=-50, | ||
max_value=50, | ||
step=0.1, | ||
unit=TemperatureUnit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not use the enum TemperatureUnit
for the unit
— it's expecting a str
.
The offset is likely in °C
, so use UnitOfTemperature.CELSIUS
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
min_value=-50, | ||
max_value=50, | ||
step=0.1, | ||
unit=PERCENTAGE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, technically, the unit for the calibration won't be a percentage, but percentage points.
Don't really think HA uses pp
as a unit for entities like this though. I do see at least one HA entity using "%", so this is likely fine.
Nop, sorry, I just been busy with life. I will try to wrap up this PR this week. |
e2fb02d
to
2464b29
Compare
PTAL. |
Proposed change
Add temperature and humidity calibration to Sonoff SNZB-02D.
Additional information
N/A.
Checklist
pre-commit
checks pass / the code has been formatted using Black