Openhab 2.5 M2
I have this items:
Number WANTotalBytesSentToday “[JS(BytesToHuman.js):%s]” (everyMinute)
Number WANTotalBytesReceivedToday “[JS(BytesToHuman.js):%s]” (everyMinute)
Number WANTotalBytesSentYesterday "[JS(BytesToHuman.js): %s]" Number WANTotalBytesReceivedYesterday "[JS(BytesToHuman.js): %s]"
The transformation is this one:
if(isNaN(i)) return “NA”
var bytes = parseFloat(i) if(bytes > 1073741824) return Math.round(bytes/1073741824) + " GB" else if (bytes > 1048576) return Math.round(bytes/1048576) + " MB" else return Math.round(bytes/1024) + " KB" })(input)
I have a graph in HABPanel to show this values.
When I hover the line it displays “Download JS(BytesToHuman.js): 11234.40” instead of the transformed value.
I have the same problem with a dummy displaying the todays download but this time it is displayed as “JS(BytesToHuman.js): 4Gb” only when I disable the checkbox “use server provided format” it displays without the JS(BytesToHuman.js): in front.
There must be changed somethin. In the past it worked correctly.