IKEA Tradfri / zigbee2mqtt / xy2HSB Transformation

Hi @ll,

one question: has anyone a working solution to convert xy + brightness back to HSB values?

I try to reflect color changes back to the colorHSB channel. I tried with a transformation and some math (https://gist.github.com/popcorn245/30afa0f98eea1c2fd34d) but did’t found a working solution.

Maybe someone solved this already?

Kind regards,