Misleading note text in "Transform Values" section OH3 GUI

As far as I know, OH3 generates pices of code for every thing, item and link I create in the GUI, so I can check out the code in the code tab afterwards.

I have added NOUS A1T (with Tasmota) as a generic MQTT thing and I have created a channel to read the power value using JSONPath (binding is installed). And here is where I get confused.

I would expect the configuration marked in red to appear in the code tab, but there is nothing there:

But there is nothing and the link is not working, the value does not show up.
When I now manually add the the code:

transformationPattern: JSONPATH:$.ENERGY.Power

at the red marked code section, it immediately works.

Is this a bug or or have I done something wrong ?

EDIT: OK, I get it, I did a mistake transformationPattern: JSONPATH:$.ENERGY.Power comes from the advaned channel config (Transform Values). But I am still confused. The note at this config toptic says:

These configuration parameters allow you to alter a value before it is published to MQTT or before a received value is assigned to an item.

I don’t want to change the value, but it looks like I have to use this config option to get the value to show up, which is pretty weird.

Your first screenshot is from the Link configuration, which links the Thing Channel to the Item.

The second screenshot (the code) is from your Thing Channel configuration.

You can perform the transform wherever you like, though it seems to be convention with MQTT to apply the transform at the Thing Channel level.

You do, because otherwise you would be passing an entire JSON string to your Item, instead of the single value you’re interested in.

1 Like

Oh ok, that makes sense, I was not aware of that. Thank you for your hints, it is the first time, that I use MQTT.

1 Like