Skip to content

Fix Tuya valve using incorrect MCU write command #3995

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

TheJulianJES
Copy link
Collaborator

Proposed change

This fixes an issue where the Tuya valve quirk (for a Rain Seer valve) was using the incorrect MCU write command.
TUYA_SEND_DATA is now used for this device (instead of the TUYA_SET_DATA command).

Additional information

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

@TheJulianJES TheJulianJES added Tuya Request/PR regarding a Tuya device bugfix This PR fixes a bug labels Apr 1, 2025
@TheJulianJES
Copy link
Collaborator Author

TheJulianJES commented Apr 1, 2025

It also looks like the battery sensor won't be working correctly. It should likely be an enum sensor for low/medium/high (or be remapped to a percentage), as this device doesn't report a percentage from what I can see. This is unrelated to this fix though.

If confirmed, another issue about that should be opened. Seems like it'll also affect other Tuya devices.

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.18%. Comparing base (d45de40) to head (cf8dccf).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3995   +/-   ##
=======================================
  Coverage   91.18%   91.18%           
=======================================
  Files         334      334           
  Lines       10862    10862           
=======================================
  Hits         9904     9904           
  Misses        958      958           

☔ 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 merged commit 7713d81 into zigpy:dev Apr 1, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR fixes a bug Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Tuya Water Valve (TS0049 by _TZ3210_0jxeoadc) [Device Support Request] TS0049 by _TZ3210_0jxeoadc
1 participant