Files
Samuele E. Locatelli 26f6480a39 Starting conf
2019-12-02 18:59:31 +01:00

8 lines
306 B
JavaScript

// Wrap everything in a function (no global variable pollution)
// variable "input" contains data passed by openHAB
(function(inputData) {
// on read: the polled number as string
// on write: openHAB command as string
var DIVIDE_BY = 100;
return parseFloat(inputData) / DIVIDE_BY;
})(input)