Profile transformations dont seem to be working.
Here is the channel - item - link definition:
{
"channelUID": "airquality:aqi:e2fd79faca:observationTime",
"configuration": {
"function": "test1.js",
"profile": "transform:JS"
},
"itemName": "AirQuality_ObservationTime"
}
test1.js (just a test script to test regex transformation using JS. Script code is fine as tested on online sites).
The input string is supposed to be in YYYY-MM-DDTHH:mm:ss.SSSZ and the result is HH:MM
cat ../transform/test1.js
(function(i) {
const regex = /\d\d\d\d-\d\d-\d\dT(\d*)\:(\d*).*/gm;
return i.replace(regex, "$1:$2");
})(input)
The log seems to show that there is some attempt to use transformations that were defined earlier. Below - the patterns were defined earlier and seem to have ‘stuck’ and the new ones (above) dont seem to take effect.
2020-11-13 02:14:57.294 [WARN ] [.profiles.RegexTransformationProfile] - Could not transform state '2020-11-13T01:00:00.000+0530' with function '(.*)' and format '%1$ta, %1$td %1$tb, %1$tl:%1$tM %1$tp'
Same behaviour is observed with other transformations like regex
Pls let me know what addl logs can I provided to troubleshoot. Thank you