Need help to migrate to the mqtt binding v2 in openhab 2.4

Thx, this helped alot. Finally i can control my lampy lamp with paper ui.

...

Channels:
        Type switch : state "lamp" [ stateTopic="zigbee2mqtt/lamp", transformationPattern="JSONPATH:$.state", commandTopic="zigbee2mqtt/lamp/set", on="ON", off="OFF", formatBeforePublish="{\"state\":\"%s\"}" ]

Now it really publishes

{“state”:“OFF”}

to the topic. But holy, thats complicated.

Do you have already found a workaround for the rgb problem?

but it seems to me that the intersection of openHAB and Zigbee2MQTT users is not that big.

Think so too. Thats why i am running homeassistant and openhab parallel to compare and to find the best solution for me… the inbuilt discovery from hass is much better than ohab though.