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 V2 Quirk for telink devices with custom ZigbeeTlc firmware #3719

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

tr4nt0r
Copy link
Contributor

@tr4nt0r tr4nt0r commented Jan 17, 2025

Proposed change

Adds quirk for devices that are originally Bluetooth devices but can be modified to use ZigBee with a custom firmware

  • MiaMiaoCe MHO-C401N
  • MiaMiaoCe MHO-C401
  • MiaMiaoCe MHO-C122-z
  • Xiaomi LYWSD03MMC
  • Qingping CGDK2-z
  • Tuya TS0201-z
  • Tuya TH03Z-z
  • Tuya ZTH01-z
  • Tuya ZTH02-z
  • Tuya LKTMZL02-z
  • Sonoff TH03-z

Edit: Some of these are already Zigbee devices but can be differentiated by the -z postfix from the ones with original fw, or in case of the tuya devices because they actually also have the correct model and manufacturer set ^^

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

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.11%. Comparing base (e61ecbb) to head (0b1b65f).
Report is 15 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3719      +/-   ##
==========================================
+ Coverage   89.87%   90.11%   +0.24%     
==========================================
  Files         320      321       +1     
  Lines       10381    10452      +71     
==========================================
+ Hits         9330     9419      +89     
+ Misses       1051     1033      -18     

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

@tr4nt0r tr4nt0r changed the title Add V2 Quirk for telink devices with cfw Add V2 Quirk for telink devices with custom ZigbeeTlc firmware Jan 19, 2025
@TheJulianJES TheJulianJES added the needs review This PR should be reviewed soon, as it generally looks good. label Jan 22, 2025
@tr4nt0r
Copy link
Contributor Author

tr4nt0r commented Jan 23, 2025

ZHA seems to be ignoring the mode=box setting and defaulting to auto instead

min_value=-327.67,
max_value=327.67,
step=0.01,
# unit=PERCENTAGE,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Support for all units was merged in ZHA with zigpy/zha#352, so we can add this now (and below), as the next HA/ZHA versions will support this.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants