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 support for the Tuya TS0021 2-gang switch #3247

Merged
merged 7 commits into from
Aug 11, 2024
Merged

Conversation

rbaron
Copy link
Contributor

@rbaron rbaron commented Jul 9, 2024

Fixes #2847, fixes #3007

Proposed change

This PR adds support for the Tuya TS0021 2-button switch. Here's an example listing for this device.

Additional information

The implementation was tested on Home Assistant core 2024.7.0.

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 Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.25%. Comparing base (d87f445) to head (f40a688).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3247      +/-   ##
==========================================
+ Coverage   88.18%   88.25%   +0.06%     
==========================================
  Files         301      302       +1     
  Lines        9412     9430      +18     
==========================================
+ Hits         8300     8322      +22     
+ Misses       1112     1108       -4     

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

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! I think this looks very good!
Awesome that you added tests 😄

tests/test_tuya.py Outdated Show resolved Hide resolved
@TheJulianJES TheJulianJES added smash This PR is close to be merged soon Tuya Request/PR regarding a Tuya device labels Aug 3, 2024
@rbaron
Copy link
Contributor Author

rbaron commented Aug 10, 2024

Thanks for reviewing it @TheJulianJES!

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.

Nice, this loos good IMO! Thanks!

@TheJulianJES TheJulianJES added the ready PR should be ready to merge label Aug 10, 2024
@TheJulianJES TheJulianJES merged commit 156aaa6 into zigpy:dev Aug 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR should be ready to merge smash This PR is close to be merged soon Tuya Request/PR regarding a Tuya device
Projects
None yet
2 participants