Skip to content

Conversation

@TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Dec 21, 2025

Proposed change

This quirk removes changing the divisor for Innr SP 240 plugs on firmware 0x191E3685 and later.

As old divisor values from the quirk may have persisted into zigpy cache, a quirk for newer versions is also added to force the correct divisor: 1000. This avoids users needing to re-pair devices to fix the issue and also allows OTA upgrades without re-pairing the device (just needing a ZHA reload or HA restart).

The config entities for the LevelControl cluster are also hidden.

Additional information

Tested with the SP 240 (on a much newer version than the latest OTA).

Fixes:

Device diagnostics

Freshly paired without quirk:
Innr SP 240 without quirk zha-01KAH6BZ8GBKBJXCPX8V4BB4KP-innr SP 240-40d6d753fef0dfeafea5ce24ed764473.json

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
  • Device diagnostics data has been attached

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (35d1fc1) to head (111460e).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4592      +/-   ##
==========================================
- Coverage   92.28%   92.28%   -0.01%     
==========================================
  Files         371      371              
  Lines       12158    12155       -3     
==========================================
- Hits        11220    11217       -3     
  Misses        938      938              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES
Copy link
Collaborator Author

TheJulianJES commented Dec 30, 2025

Hmm, this does not work. The quirk still always applies. Only if allow_missing=False is added will the quirk (never) apply. Will take a look..
I hope we just load everything early enough for the filter to even work at all.

@TheJulianJES
Copy link
Collaborator Author

Yeah... It seems like we only load attributes after we do the software version check. So, it'll never work.

@TheJulianJES
Copy link
Collaborator Author

This correctly works with zigpy/zigpy#1735 now. The remaining related "issues" are:

Except for fixing the other Innr plug models, everything else needs to be addressed in zigpy/ZHA. This PR should be good to go. We can fix other the other Innr plug in another PR.

@TheJulianJES TheJulianJES marked this pull request as ready for review January 3, 2026 02:32
@TheJulianJES TheJulianJES added the smash This PR is close to be merged soon label Jan 3, 2026
@TheJulianJES TheJulianJES changed the title Remove custom divisor for Innr SP 240 on 0x191E3685 Fix custom divisor for Innr SP 240 on 0x191E3685 Jan 3, 2026
@TheJulianJES TheJulianJES merged commit ec82cb8 into zigpy:dev Jan 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smash This PR is close to be merged soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant