Skip to content

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.52%. Comparing base (e61ecbb) to head (32f0154).
Report is 58 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3719      +/-   ##
==========================================
+ Coverage   89.87%   90.52%   +0.64%     
==========================================
  Files         320      324       +4     
  Lines       10381    10626     +245     
==========================================
+ Hits         9330     9619     +289     
+ Misses       1051     1007      -44     

☔ 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

@TheJulianJES TheJulianJES added the smash This PR is close to be merged soon label Jan 27, 2025
@TheJulianJES TheJulianJES changed the title Add V2 Quirk for telink devices with custom ZigbeeTlc firmware Add Telink devices with custom ZigbeeTlc firmware quirk Jan 27, 2025
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.

LGTM. Thanks!

@TheJulianJES TheJulianJES merged commit d3d43b1 into zigpy:dev Jan 27, 2025
9 checks passed
Comment on lines +195 to +196
off_value=1,
on_value=0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, I think we could also use force_inverted for this? Shouldn't really make a difference though.

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. smash This PR is close to be merged soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants