Do not double IKEA battery percentage by default #3176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
No longer double the battery percentage for IKEA devices using the "Doubling" clusters.
Instead, the value is left untouched until
sw_build_id
is read once. If it's confirmed old firmware then, the percentage will be doubled automatically.Future incoming reports will immediately double the value.
I want to change the default for this, so that we can always use the "Doubling" clusters in v2 quirks.
Newer devices don't briefly see a flash above 100% then.
Related PR quirks v2 PR:
Additional information
Follow-up PR to:
The latter PR linked has a further explanation of this fix. The only thing that's changed is the default.
Previously, we always doubled for unknown firmware if the cluster was used. After checking
sw_build_id
and then seeing it's new firmware, the value would be "undoubled".This PR just changes the default, so the value isn't doubled until
sw_build_id
is read and confirmed it's old firmware.Checklist
pre-commit
checks pass / the code has been formatted using Black