Respect explicit light color-temperature capabilities - #836
Draft
dmulcahey wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #836 +/- ##
==========================================
+ Coverage 97.19% 97.20% +0.01%
==========================================
Files 57 57
Lines 10560 10566 +6
==========================================
+ Hits 10264 10271 +7
+ Misses 296 295 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dmulcahey
force-pushed
the
codex-updated-pr-572
branch
from
September 5, 2026 19:06
917fa08 to
986a1b2
Compare
color_temperature attribute when computing light capabilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A cached
color_temperaturevalue currently overrides an explicit capability bitmap that says a light cannot control color temperature. This exposes an unusable mode on captured dimmer/RGB devices.Treat a readable capability bitmap as authoritative and clear stale temperature state when capabilities are recomputed. When the bitmap is absent or unsupported, preserve the existing attribute-based detection for legacy lights. This avoids introducing a new profile/device-type inference policy and retains the two captured Tuya lights without a supported bitmap (
tz3210-bfwvfyx1-ts0505bandtz3000-5fkufhn1-ts0502a).The six updated diagnostic snapshots remove false temperature support from ERICSITY/GLEDOPTO dimmers, HOMR, LEDVANCE RGB, and the SONOFF router capture. Tests cover explicit-negative capabilities, stale-state clearing, and the complete diagnostic corpus. Hardware was not exercised.
Updated replacement for #572; addresses home-assistant/core#156133.
Validation against
devat66603431339afe37fa0048b70ff31d77dceb8f95: Python 3.12 full suite, 1384 passed, coverage above the 95% project gate; full pre-commit (codespell, Ruff, formatting, mypy, lock check) passed. Relevant regression checks fail on the unchanged base. GitHub CI for Python 3.12/3.13/3.14 is reported separately on the PR.