-
Notifications
You must be signed in to change notification settings - Fork 788
Add Sonoff water valve leak and supply sensors #3910
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3910 +/- ##
==========================================
+ Coverage 91.00% 91.11% +0.10%
==========================================
Files 328 333 +5
Lines 10656 10774 +118
==========================================
+ Hits 9698 9817 +119
+ Misses 958 957 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I will move this to open later today when I can test it, but FYI @TheJulianJES . |
a977aa1
to
223d325
Compare
ce3a711
to
a0bf713
Compare
Question: Is there any way to define reporting for the |
a0bf713
to
8ff2349
Compare
@TheJulianJES Can you let me know the answer to my question above? ![]() |
That is expected if the sensor has a state class due to the way |
Thanks for the information. I thought that might be related but wasn't sure. Regarding:
Do you happen to know the answer? I'd like to finish this PR. |
8ff2349
to
184d579
Compare
Only possible to do directly with the sensor function at the moment. |
Thanks. I will update this and open It for review. |
184d579
to
69ea0a6
Compare
While here rename EwelinkCluster to match other Sonoff quirks.
69ea0a6
to
6017e1f
Compare
Ok, I think this is ready for review now. PTAL. |
Does this apply to the entity ID as well? I can see both have |
Yes. The entity will be generated from the name, which will be the fallback_name you specified when it gets integrated in HA. |
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.
Thanks!
reporting_config=ReportingConfig( | ||
min_interval=30, max_interval=900, reportable_change=1 | ||
), | ||
translation_key="water_leak", |
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.
If we didn't have a translation key for this, the name would be "Moisture" due to the device class.
I think we can leave the "Water leak" name here though, since it's a bit more explicit for this device.
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.
Thanks again!
Thank you for updating and merging this PR. |
Proposed change
Add sensors for water leaks and supply problems.
While here rename EwelinkCluster to match other Sonoff quirks.
Additional information
Follow-up from #3346.
Supersedes zigpy/zha#189.
Checklist
pre-commit
checks pass / the code has been formatted using Black