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 TY0201 temperature/humidity sensor #3201

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

philippedeswert
Copy link
Contributor

@philippedeswert philippedeswert commented Jun 12, 2024

This seems to be a pretty common sensor, for which several models seem to exist : _TZ3000_bjawzodf and _TZ3000_zl1kmjqx

Proposed change

Add support for another humidity/temperature sensor

Additional information

First time contributing here. And I am not sure it is completely correct, but
this quirk is confirmed to work for a wide number of people. I welcome any comments
to improve this.

Fixes #2862, fixes #2851, fixes #2701

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

This seems to be a pretty common sensor, for which several models
seem to exist : _TZ3000_bjawzodf and _TZ3000_zl1kmjqx

Fixes: zigpy#2862, zigpy#2851, zigpy#2701

Signed-off-by: Philippe De Swert <[email protected]>
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.18%. Comparing base (c6ed94a) to head (aaecf4d).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3201      +/-   ##
==========================================
+ Coverage   88.17%   88.18%   +0.01%     
==========================================
  Files         300      301       +1     
  Lines        9386     9396      +10     
==========================================
+ Hits         8276     8286      +10     
  Misses       1110     1110              

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

@javicalle
Copy link
Collaborator

Hi @philippedeswert, thanks for the contribution.
Your quirk is fine and i believe that can be merged as is, but would be possible to implement and test a v2 quirks version of that quirk?
There is a similar one here: #3203

Thanks in advance.

@philippedeswert
Copy link
Contributor Author

Hi @philippedeswert, thanks for the contribution. Your quirk is fine and i believe that can be merged as is, but would be possible to implement and test a v2 quirks version of that quirk? There is a similar one here: #3203

I'll give it a try. Do I update this PR or is it better to make a new one if I get it working with v2?

@javicalle
Copy link
Collaborator

Do I update this PR or is it better to make a new one if I get it working with v2?

It's fine to update this PR, but whatever you feel confortable will be fine.

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Jun 21, 2024
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! We can change this to a v2 quirk in the future.
For now, this should be good to go.

@TheJulianJES TheJulianJES changed the title Add support for TY0201 temperature/humidity sensor Add Tuya TY0201 temperature/humidity sensor Jun 26, 2024
@TheJulianJES TheJulianJES merged commit c20e40a into zigpy:dev Jun 26, 2024
6 checks passed
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
Projects
None yet
3 participants