Set color_temp_physical_min

Hi,

I have a Gledopto LED controller with a sepperatly sourced LED strip.
The LED strip has a color temperature between 2700K and 6500K (or 370 mireds and 154)
The reported min/max values from te controller are between 2020K and 6329K are (495 and 158)

I would like to adjust these values by changing following attributes.

color_temp_physical_min (id: 0x400b)
color_temp_physical_max (id: 0x400c)

However I’m not able to write an integer to this value. Has someone experience in adjusting those value? and how can I do this.
I tried this via ZHA toolkit with following parameters but this doesn’t doe anything.

service: zha_toolkit.attr_write
data:
  endpoint: 11
  cluster: 768
  attribute: 16396
  attr_val: "500"
  ieee: light.gerbil_light

Actually run into the same problem: I have a Gledopto GL-C-006P and like to adjust the color temperature to what my LEDs are.

The LED strip has a color temperature between 2700K and 6500K.

From what I understand, the attributes can’t be written. But a ZHA quirk can be used to override those.

I’ve added this to the configuration.yaml

zha:
  custom_quirks_path: /config/custom_zha_quirks/

You can find my quirk for the GL-C-006P in this GitHub Gist. I’ve stored the quirk in /config/custom_zha_quirks/glc006p.py. After a restart the attributes get overriden and I can set the color temperature in the correct range :tada:

Update: Actually, this seems to restrict what color temperature can be set: With the warmest white there is still a cold white component now. I am not sure how to set the actual min/max.