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

Convert Tuya sirens to v2 quirks #3741

Merged
merged 7 commits into from
Jan 21, 2025

Conversation

prairiesnpr
Copy link
Collaborator

@prairiesnpr prairiesnpr commented Jan 20, 2025

Proposed change

This converts the existing Tuya sirens to v2 and add some additional ones.

_TZE200_d0yu2xgi Based on: https://github.com/Koenkk/zigbee-herdsman-converters/blob/f42aa5080ee933e8cde9fc08c67a88bf886d71ff/src/devices/neo.ts#L13

_TZE200_t1blo2bj, _TZE204_t1blo2bj, and _TZE204_q76rtoa9 Based on: https://github.com/Koenkk/zigbee-herdsman-converters/blob/f42aa5080ee933e8cde9fc08c67a88bf886d71ff/src/devices/neo.ts#L48C91-L48C107

_TZE204_hcxvyxa5 Based on: https://github.com/Koenkk/zigbee-herdsman-converters/blob/f42aa5080ee933e8cde9fc08c67a88bf886d71ff/src/devices/tuya.ts#L12753

_TZE204_fncxk3ob and CBased on: https://github.com/Koenkk/zigbee-herdsman-converters/blob/f42aa5080ee933e8cde9fc08c67a88bf886d71ff/src/devices/tuya.ts#L10621C51-L10621C67

Additional information

Closes: #2300
Closes: #3180
Closes: #3545

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 Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.08%. Comparing base (080f73f) to head (f5b13d8).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3741      +/-   ##
==========================================
+ Coverage   90.04%   90.08%   +0.04%     
==========================================
  Files         321      320       -1     
  Lines       10442    10415      -27     
==========================================
- Hits         9402     9382      -20     
+ Misses       1040     1033       -7     

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

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Jan 20, 2025
Comment on lines 211 to 217
.tuya_enum(
dp_id=101,
attribute_name="power_type",
enum_class=NeoBatteryState,
translation_key="power_type",
fallback_name="Power type",
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a sensor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f5b13d8 should address this.

@TheJulianJES TheJulianJES added the needs review This PR should be reviewed soon, as it generally looks good. label Jan 21, 2025
@TheJulianJES TheJulianJES changed the title Convert Tuya sirens to v2 Convert Tuya sirens to v2 quirks Jan 21, 2025
@TheJulianJES TheJulianJES merged commit eeb4403 into zigpy:dev Jan 21, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review This PR should be reviewed soon, as it generally looks good. Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] YXZBSL Siren Tuya [Device Support Request] TuyaSiren _TZE204_t1blo2bj
2 participants