Skip to content

Allow disabling Sonoff SWV "Water shortage auto-close" #4207

Merged
TheJulianJES merged 6 commits into
zigpy:devfrom
maga-1:patch-1
Jul 30, 2025
Merged

Allow disabling Sonoff SWV "Water shortage auto-close" #4207
TheJulianJES merged 6 commits into
zigpy:devfrom
maga-1:patch-1

Conversation

@maga-1
Copy link
Copy Markdown
Contributor

@maga-1 maga-1 commented Jul 27, 2025

SWV has a function to turn off water automatically, when no or low water flow is detected. This is a problem for drip irrigation, for example.
In Firmware version 1.0.4 a function was introduced to turn off this behavior:

Proposed change

I propose to add a switch to the existing quirk that allows to use this function from HA.

image

Additional information

This PR is complementary to #3930. However, accessing "Auto close when water shortage" via ZHA commands is only possible with a modified quirk.

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

Added support for turning off "Auto close when water shortage"
Ids according to: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/sonoff.ts
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 27, 2025

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4207   +/-   ##
=======================================
  Coverage   92.03%   92.03%           
=======================================
  Files         350      350           
  Lines       11602    11603    +1     
=======================================
+ Hits        10678    10679    +1     
  Misses        924      924           

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

Comment thread zhaquirks/sonoff/swv.py
@TheJulianJES TheJulianJES added the smash This PR is close to be merged soon label Jul 30, 2025
@TheJulianJES TheJulianJES changed the title SONOFF SWV: Add support for turning off "Auto close when water shortage" Allow disabling Sonoff SWV "Auto close when water shortage" Jul 30, 2025
Comment thread zhaquirks/sonoff/swv.py Outdated
maga-1 and others added 2 commits July 30, 2025 08:53
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Copy link
Copy Markdown
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.

Ok, I'll change up a few names and then merge this.

Comment thread zhaquirks/sonoff/swv.py Outdated
Comment thread zhaquirks/sonoff/swv.py Outdated
Comment thread zhaquirks/sonoff/swv.py Outdated
@TheJulianJES TheJulianJES changed the title Allow disabling Sonoff SWV "Auto close when water shortage" Allow disabling Sonoff SWV "Water shortage auto-close" Jul 30, 2025
@TheJulianJES TheJulianJES merged commit 81e543a into zigpy:dev Jul 30, 2025
9 checks passed
@maga-1
Copy link
Copy Markdown
Contributor Author

maga-1 commented Jul 30, 2025

Thank you for handling this PR!

@TheJulianJES
Copy link
Copy Markdown
Collaborator

Thanks for creating it! 😄

@maga-1 maga-1 deleted the patch-1 branch August 3, 2025 13:08
totoroot pushed a commit to totoroot/zha-device-handlers that referenced this pull request Feb 18, 2026
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smash This PR is close to be merged soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants