I am struggling with transformation of a channel, it is probably a small syntax thing.
So I hope someone is able to help my out here.
I have a sitemap with the following line: Text item=ToonThermostaatCurrentTemp label="Current Temperature [JS(div100.js):%.1f °C]"
Works fine: content of item is divided by 100, and I used it as proof that my JS transformation is working.
Now I would like to add that transformation to a channel (after json transformation), and I tried this: stateTransformation: JSONPATH:$.currentSetpoint ∩ JS:div100.js
But then I get an error: 2021-04-05 10:41:16.643 [WARN ] [.transform.SingleValueTransformation] - Transformation service JS for pattern div100.js not found!
What I am trying to achieve:
I use a Thing from the http binding to get json from my thermostat. The thermostat setpoint is provided as 2000. I would like to transform that to 20,00 and put it as a setpoint on a sitemap. And yes, It indeed means I need to multiply the number with 100 again when sending the setpoint to the thermostat
Where did you put that, how did you put that? I’m thinking about possibly quotemarks, brackets, and encoding here (there is the funny bridge character for example).