Migrate JS Transformation

In openhab 3.4 the item had a display transformation “JS(clockfmt.js):%s” to show a formatted time.
As JS transformation are gone in oh4 i added the “javascript” add-on to my oh4 installation. Then I tried different syntax.e.g


No luck!
In the log are many  "The transformation add-on 'javascript' does not exist " appear.

Nothing changes in OH 4 once the add-on is installed. Go back to JS(clockfmt.js):%s.

Oh - simpler than expected. Thanks!
I did install the nashorn Javascript too - is it required for this?
Do you know, how I can get rid of obsolete add-on:
" The transformation add-on ‘javascript’ does not exist - ignoring it."

No and in fact with that syntax Nashorn will not be used.

You’ll have to open $OH_USERDATA/config/org/openhab/addons.config and remove “javascript” from the “transformation” line.


Hm - it looks like I still have a small problem. When startng up i got several messages like:
“couldn’t transform response because transformationService of type ‘JS’ is unavailable”

You’ve installed the JS Scripting addon, not the Nashorn add-on?