In OH4, to have the JavaScript transform, you must install one of the JavaScript scripting add-ons. If you were using the built-in JavaScript in OH3, that is no longer installed by default.
In OH 4 the transform profile now has two parts. There’s the Thing to Item transformation and the Item to Thing transformation. I’ve no idea how these are represented in a text based Item config.
But it sounds like you need an Item to Thing transformation perhaps, or maybe a transformation on the Channel config. I don’t use KNX so can’t be more specific.
I have both toItemScript and toHandlerScript specified, so this should handle both directions.
However I’m unsure if I need to modify the javascript code to return the proper unit, which should be Dimensionless with ‘%’
As to what UI I’m refering to,I use just the default MainUI, specifically the autogenerated buttons / rollershutter control by the semantic model.
I think it’s worth investigating if the unit is the issue. There’s already been one report of a % unit in a label interfering with the proper function of a widget:
Try removing the unit in the label on the item.
By my understanding this shouldn’t happen: 1) I though the new UoM only applied to Number:unit items, but that’s a dimmer item in the previous report so it’s possible this extends to the your rollershutter item, 2) the arrows in the rollershutter widget are sending UP and DOWN commands, so I have no idea why the UoM should interfere with that.
It is supposed to only be looked at for Number:Unit Items. In all other cases it is supposed to be ignored. If that isn’t the case an issue should be filed.