// Wrap everything in a function (function(i) { return parseFloat(i) / 3600; })(input) // input variable contains data passed by openhab