Skip to content

Respect explicit light color-temperature capabilities - #836

Draft
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-572
Draft

Respect explicit light color-temperature capabilities#836
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-572

Conversation

@dmulcahey

@dmulcahey dmulcahey commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

A cached color_temperature value 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-ts0505b and tz3000-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 dev at 66603431339afe37fa0048b70ff31d77dceb8f95: 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.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.20%. Comparing base (6660343) to head (986a1b2).

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.
📢 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.

@dmulcahey
dmulcahey force-pushed the codex-updated-pr-572 branch from 917fa08 to 986a1b2 Compare September 5, 2026 19:06
@dmulcahey dmulcahey changed the title Codex updated: Ignore color_temperature attribute when computing light capabilities Respect explicit light color-temperature capabilities Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant