Issue with LED (rgbww) Gamma / Constant brightness / Color temperature

Hello Girls and Guys,

It seems like there is an issue with the current Homeassistant implementation of the Color Temperature setting.

In ESPHome you got the option to configure a light components gamma to make its respone match the human eye. This makes the dim curve non linear resulting in better dimming performance and accurate colors as they match our eyes response.

- platform: rgbww
    name: "LED"
    id: strip_1
    red: out1_r
    green: out1_g
    blue: out1_b
    cold_white: out1_cw
    warm_white: out1_ww
    cold_white_color_temperature: 6000 K
    warm_white_color_temperature: 2000 K
    gamma_correct: 2.8

A CW/WW or a RGBWW component also got the option to keep the brightness constant while using color temperature.

E.g setting 100% on both W channels would result in 50% duty PWM value on both →
We get essentially 50% brightness on both channels resulting in the same total brightness as 100% on a single channel. This limits the maximum brightness but is often desired as it keeps the brightness the same.

constant_brightness: true

The problem is with Homeassistant also trying to apply the same logic but before the gamma correction happens.

Lets say i want to set the above configured light to 4000k in HA:

action: light.turn_on
target:
  entity_id:
    - light.LED
data:
  kelvin: 4000

This results in HA sending this:

[15:05:55][D][light:036]: ‘LED’:
[15:05:55][D][light:047]: State: ON
[15:05:55][D][light:055]: Color brightness: 0%
[15:05:55][D][light:059]: Red: 100%, Green: 100%, Blue: 100%
[15:05:55][D][light:071]: Cold white: 75%, warm white: 25%
[15:05:55][D][light:085]: Transition length: 0.5s

This makes no sense.
It should send CW and WW with both 50% as 4000k is exactly between 2000k and 6000k.
But worse: as ESPHome applies the Gamma correction ontop of the values, the total brightness would be much less than 100%.

Total brightness would only equal 100% if the Gamma on ESPhome is set to 1.
Which makes dimming improper to the eye and colormixing doesnt match the color picker anymore.

Setting constant_brightness: true makes it even worse, as ESPhome applies the interlock ontop of all of that.
Resulting in essentially having color interlocked twice, ones in HA which gets scaled by the gamma setting in ESPHome and than the resulting brightness gets kept constant by ESPHome again.

Resulting in much lower brightness than expected.

Is there a way to disable the color interlock in HA? Making it respond properly to the color temperature call of “4000k” resulting in appling 100% on both channels?
Or maybe telling HA which gamma the light uses so it can “back calculate” how much brightness on each channel is nessesary (say 77% on both or so) to get 50+50 duty PWM value out of ESPHome?