Kelvin is not enough: the case for per-entity LED calibration profiles in HA #3538
Replies: 8 comments 19 replies
-
|
There appears to be a more widespread use case for this profiling functionality. See this post describing the issue with Adaptive Lighting basnijholt/adaptive-lighting#421 Long outstanding. Not getting the love it needs. |
Beta Was this translation helpful? Give feedback.
-
|
To back up the proposal with something concrete: I built a working proof-of-concept custom component that implements exactly the minimum viable case described above. Repo: https://github.com/roelanddewindt/ha-calibrated_led It wraps any existing RGB light entity and intercepts Tested on HA 2026.3 with a Zigbee RGB strip. Because it goes through the standard The component is deliberately marked as a PoC throughout — the naming, the version ( Happy to discuss where this would live in core. |
Beta Was this translation helpful? Give feedback.
-
Update: v0.0.2-poc — XY output mode + field observationsXY output modev0.0.2-poc adds an XY output mode for Zigbee controllers that intercept RGB commands internally (e.g. MiBoxer via Z2M), bypassing the lossy RGB→XY→RGB double conversion. The XY route was necessary because arriving at usable RGB profiles on the MiBoxer controller proved impractical — changing one channel dragged others along unpredictably, making empirical RGB calibration impossible on this hardware. Why per-entity calibration is necessaryTo validate the core premise, I profiled three different LED strips from different brands using a spectrophotometer and the Argyll open-source toolset. The results were striking:
The same generic Kelvin→RGB formula that HA applies today produces a different wrong answer on every strip. There is no single correction that works across hardware — per-entity calibration is the only viable approach. On measurement toolingI was fortunate to have access to a spectrophotometer and the Argyll open-source toolset. Calibrating by eye alone is possible but unreliable — metamerism means what looks right under one light source may not under another, and you'll never know how far off you are. A spectrophotometer is strongly advisable for anyone serious about this. That said, most users will never have access to one, or the inclination to run measurement sessions against their LED strips. The bigger pictureThis points to two things that would meaningfully improve the situation at scale:
|
Beta Was this translation helpful? Give feedback.
-
|
Also see this related discussion about capping channels to reach the same level of brightness between lights sources. A similar calibration profile, produced by measurement or naked eye, could sit between what the end user asks for and what HA sends out as a command to the light entities. |
Beta Was this translation helpful? Give feedback.
-
|
Also see this related issue on the AL repo: basnijholt/adaptive-lighting#1428 — someone independently arrived at the same anchor interpolation approach, which is encouraging validation that this is the right abstraction. One platform-level solution based on per-entity calibration profiles would make all issues go away. |
Beta Was this translation helpful? Give feedback.
-
|
Tangentially related: a visualisation of average wake-up times across European countries (warning: FB link) illustrates how much circadian rhythms vary by latitude, geography, and culture. Take the data with a pinch of salt, but the directional point holds. If circadian lighting is to be meaningful, accurate colour temperature reproduction is a prerequisite. A perfectly timed activating morning light that actually renders as something else defeats the purpose entirely. |
Beta Was this translation helpful? Give feedback.
-
|
IMO wherever it can't be fixed on the device itself, the remapping belongs in ZHA, Z2M, and anything else which acts as a border between devices and anything which wants to talk to them. |
Beta Was this translation helpful? Give feedback.
-
|
Another related issue that unfortunately got "closed as not planned" is AL#93. Luckily it got a second life as AL#124 in v2 Inbox. There's still hope, but my opinion is this is not an issue AL should fix, as it is an HA core issue. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description of proposed core improvement
Add support for user-defined color calibration profiles on
lightentities operating inrgborrgbwwcolor mode. The minimum viable form is a manual linear profile: the user provides empirically determined RGB anchor points for at least two color temperatures (e.g. 2700K warm white and 6500K cool white), and Home Assistant interpolates linearly between those anchors for any requested color temperature — substituting the corrected RGB values in place of the generic formula output.Current limitations
When a user selects a color temperature (e.g. 2700K "warm white") on an RGB LED strip, Home Assistant computes an RGB tuple based on an idealized model of what red, green, and blue LEDs look like. Real RGB strips — particularly inexpensive ones — routinely violate those assumptions. Channel luminances, spectral response curves, and maximum brightness values deviate significantly from the standard primaries the formula assumes. The result is that the same mired value that produces a pleasant warm white on a calibrated bulb produces visibly wrong output on an uncalibrated strip: pink, magenta, or greenish casts that no reasonable user would accept as warm white.
There is currently no mechanism in Home Assistant to correct for this. The only workaround is constructing a template light in YAML that intercepts
set_temperatureand substitutes hand-tuned RGB values — an approach that is undiscoverable, requires significant YAML expertise, and provides no UI for the calibration process itself.Technical benefits
Because the color intent originates in Home Assistant's light platform, a calibration profile defined at the entity level would fix the problem universally — regardless of whether the strip is driven via Zigbee, Z-Wave, ESPHome, or MQTT. Every downstream driver and firmware would benefit without independently needing to implement correction.
A two-anchor linear implementation is the minimum useful case and covers the majority of real-world needs. A more complete implementation could support a multi-point lookup table across the full mired range, and eventually a 3×3 color matrix (analogous to an ICC profile's colorant matrix) for full hue accuracy across the color wheel.
Entities without a calibration profile defined would behave identically to today — fully backwards compatible.
Additional context
This problem is not new. The display industry solved it decades ago with device color profiles — ICC profiles and Apple ColorSync. The core insight is fundamental: without knowing a device's actual primary chromaticities and white point, it is mathematically impossible to fire digitally controlled RGB values that reliably produce a target color. ColorSync profiles declare the device's real capabilities and allow the OS to compute corrected channel values for any desired color intent. LED strip controllers have no equivalent mechanism, and the smart home ecosystem has not yet caught up.
The gap is particularly visible on cheap RGB strips where channel balance varies significantly between batches and manufacturers — a known and documented problem in the LED industry, but one that home automation platforms have so far treated as the user's problem to work around rather than a platform capability to address.
Beta Was this translation helpful? Give feedback.
All reactions