Unfortunately it's technically impossible to programmatically associate the color-x and -y messages which belong together, without making additional assumptions.
Justification: order of messages is not defined, messages are interleaved with other messages.
As a consequence it is impossible to display the color value reliably in a MQTT client. It will always be some kind of guessing or heuristic.
Describe the solution you'd like
A new message like
zigbee2mqtt/<friendly-name>/color-x-y 0.4398,0.405
would fix that issue.
Describe alternatives you've considered
The feature "json messages" would also fix the issue, but requires json processing.
zigbee2mqtt/<friendly-name> {"brightness":254,"color":{"x":0.4398,"y":0.405},"color_mode":"color_temp","color_temp":337,"linkquality":42,"state":"OFF"}
Is your feature request related to a problem? Please describe
When subscribing to color bulbs, zigbee2mqtt sends following messages to the subscriber:
Unfortunately it's technically impossible to programmatically associate the color-x and -y messages which belong together, without making additional assumptions. Justification: order of messages is not defined, messages are interleaved with other messages. As a consequence it is impossible to display the color value reliably in a MQTT client. It will always be some kind of guessing or heuristic.
Describe the solution you'd like
A new message like
zigbee2mqtt/<friendly-name>/color-x-y 0.4398,0.405
would fix that issue.Describe alternatives you've considered
The feature "json messages" would also fix the issue, but requires json processing.
zigbee2mqtt/<friendly-name> {"brightness":254,"color":{"x":0.4398,"y":0.405},"color_mode":"color_temp","color_temp":337,"linkquality":42,"state":"OFF"}
Additional context
None