Thanks for the help
I just restartet the Openhab Server but sadly, i got still the same errors.
Sorry about the code.
It still cant parse
2018-04-02 17:30:12.791 [WARN ] [ab.binding.http.internal.HttpBinding] - Transformation 'JS(getHueLastChange.js)' threw an exception. [response={"state":{"temperature":1687,"lastupdated":"2018-04-02T15:29:41"},"swupdate":{"state":"noupdates","lastinstall":null},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"name":"Hue temperature sensor 1","type":"ZLLTemperature","modelid":"SML001","manufacturername":"Philips","productname":"Hue temperature sensor","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:03:28:82:92-02-0402","capabilities":{"certified":true}}]
org.openhab.core.transform.TransformationException: An error occurred while loading script.
at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [211:org.openhab.core.compat1x:2.2.0]
at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:194) [219:org.openhab.binding.http:1.11.0]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [211:org.openhab.core.compat1x:2.2.0]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [211:org.openhab.core.compat1x:2.2.0]
2018-04-02 17:30:13.812 [WARN ] [ab.binding.http.internal.HttpBinding] - Transformation 'JS(getHueLastChange.js)' threw an exception. [response={"state":{"temperature":1687,"lastupdated":"2018-04-02T15:29:41"},"swupdate":{"state":"noupdates","lastinstall":null},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"name":"Hue temperature sensor 1","type":"ZLLTemperature","modelid":"SML001","manufacturername":"Philips","productname":"Hue temperature sensor","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:03:28:82:92-02-0402","capabilities":{"certified":true}}]
org.openhab.core.transform.TransformationException:
Thats what i get when i run your script with the config seperated in http.cfg and items
Edit
fuck its working. I guess the warning/error is because there wasnt any “past Temperature”