MQTT - Osram Lightify Flex RGBW

With 155 posts, and not particularly on topic, I don’t blame you! I just remembered that someone had a similar issue, and it turns out it’s the same bulb!

This is a old topic, but I have found a working solution to set color, but I don’t know how to get “selected color”:

			Type color : color "Color" [ commandTopic="zigbee2mqtt/Llum/BombetaRBG/set", formatBeforePublish="{ \"color\" : { \"rgb\" : \"%1$d,%2$d,%3$d\" } }", stateTopic="zigbee2mqtt/Llum/BombetaRBG", transformationPattern="JSONPATH:$.color" , colorMode="RGB" ]

Zigbee2MQTT transform correctly from color RGB to color XY that needs (in my case), my Bulb.

But it raise a warning about getting the incoming transformation, as it can’t transform the json with x / y values to RGB of thing.

Hey, ever found the solotion? i have the same question, i can send color, but i dont get the correct color state:


		Type color : led_alessioc "Led Alessio" 	[ stateTopic="openhab/light/led_alessio/state",
														commandTopic="openhab/light/led_alessio/set_light",
														colorMode="RGB",
														transformationPattern="JS:color2.js∩JSONPATH:$.color", 
														formatBeforePublish="{\"state\": \"ON\",\"color\": {\"r\": %1$d,\"g\": %2$d,\"b\": %3$d}}" ]

i see error like indeed:
2024-11-07 20:19:59.627 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '{h=120, s=100, x=0.172, y=0.747, r=0, g=255, b=0}' from channel 'mqtt:topic:ha_mqtt_broker:verlichting_slaapkamers:led_alessioc' not supported by type 'ColorValue': {h=120, s=100, x=0.172, y=0.747, r=0, g=255, b=0} is not a valid string syntax