Skip to content
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

Add sensors for Sonoff SWV Smart Water Valve status #189

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

benbancroft
Copy link
Contributor

@benbancroft benbancroft commented Aug 31, 2024

Proposed change

Adds a valve leak and water supply status binary sensors for export to Home Assistant.

This feature was requested as part of zigpy/zha-device-handlers#3298

Additional information

Testing

I have tested this with my Sonoff SWV-BSP Smart Water Valve.

Screenshot 2024-08-31 201932

@dmulcahey
Copy link
Contributor

If you run script/setup from the root of the checked out project it will set up a venv for you and also install a commit hook w/ pre-commit so that you can catch the lint errors before committing. if you already have a venv activate it and run pre-commit install

@TheJulianJES TheJulianJES added the pre-commit.ci run Re-run pre-commit CI hook to automatically fix pre-commit issues. label Sep 2, 2024
@pre-commit-ci pre-commit-ci bot removed the pre-commit.ci run Re-run pre-commit CI hook to automatically fix pre-commit issues. label Sep 2, 2024
@TheJulianJES
Copy link
Contributor

Pre-commit fixes are now also applied automatically as well when pushed to a PR. So, you can just update your local changes from the branch you pushed to.
Still, I'd also recommend running script/setup. The path should be updated for uv after the install, but I remember there being issues with the install script not doing that in the past, so let me know if you need any help with it.

@TheJulianJES TheJulianJES added the entities Issue or PR about (custom) entities label Sep 24, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.46%. Comparing base (6737b36) to head (b41a039).

Files with missing lines Patch % Lines
...ha/application/platforms/binary_sensor/__init__.py 89.47% 2 Missing ⚠️
...ha/zigbee/cluster_handlers/manufacturerspecific.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #189      +/-   ##
==========================================
- Coverage   96.49%   96.46%   -0.04%     
==========================================
  Files          61       61              
  Lines        9426     9448      +22     
==========================================
+ Hits         9096     9114      +18     
- Misses        330      334       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheJulianJES
Copy link
Contributor

FYI, we merged an initial quirk that defines the custom cluster and attributes: zigpy/zha-device-handlers#3346
No quirks v2 entities are exposed yet. I'm hoping we can get a custom attribute_converter for parsing state exposed via quirks v2 soon: #305. If that's done, we might be able to fully expose everything via quirks v2 for this device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entities Issue or PR about (custom) entities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants