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 Tuya Royal Gardineer irrigation valve quirk #3505

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

mrrstux
Copy link
Contributor

@mrrstux mrrstux commented Nov 10, 2024

Proposed change

Quirk for supporting Royal Gardineer valve.
Similar to this device.

Additional information

Exposes:

  • open/close command
  • battery remaining percentage
  • water consumption
  • timer time left
  • timer state
  • last open duration
  • weather delay

Valve works on a timer only, with a default timer of 10 minutes. Before opening the valve, it is recommended to set the irrigation desired time in the "Timer time left" field.

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

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.76%. Comparing base (7995008) to head (c8fc5a6).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3505   +/-   ##
=======================================
  Coverage   89.75%   89.76%           
=======================================
  Files         320      320           
  Lines       10371    10381   +10     
=======================================
+ Hits         9308     9318   +10     
  Misses       1063     1063           

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

@mrrstux mrrstux force-pushed the add-royal-gardineer-valve-quirk branch from 2454a60 to 30bac30 Compare November 16, 2024 09:22
@mrrstux mrrstux force-pushed the add-royal-gardineer-valve-quirk branch from 30bac30 to 73285eb Compare November 22, 2024 20:04
@TheJulianJES TheJulianJES added Tuya Request/PR regarding a Tuya device v2 quirk Quirks using v2 API. Might add custom entities that need translation keys in HA. needs review This PR should be reviewed soon, as it generally looks good. labels Nov 24, 2024
@TheJulianJES TheJulianJES changed the title Add support for Royal Gardineer Irrigation Valve. Add Tuya Royal Gardineer irrigation valve quirk Nov 24, 2024
@prairiesnpr
Copy link
Contributor

Once #3550 is merged or a variation of it, the correct power config will be available.

Copy link
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.

Thanks for the PR! Looks good to me.

I've changed the power configuration cluster to TuyaPowerConfigurationCluster2AA now. It should work in Home Assistant Core 2024.12 and later.
It won't work when used as a custom quirk in 2024.11 though.

@TheJulianJES TheJulianJES removed the needs review This PR should be reviewed soon, as it generally looks good. label Nov 27, 2024
@TheJulianJES TheJulianJES merged commit abf208e into zigpy:dev Nov 27, 2024
9 checks passed
@mrrstux mrrstux deleted the add-royal-gardineer-valve-quirk branch November 27, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tuya Request/PR regarding a Tuya device v2 quirk Quirks using v2 API. Might add custom entities that need translation keys in HA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants