I use follow rulescript to get the correct value:
// triggeringItem.state = 1444 val watt = Math::round(((triggeringItem.state as Number)/1000).intValue)
now watt contains only 1 but how can i convert it to #:# ?
i tried follow script but it doesn’t work:
var DecimalFormat df = new DecimalFormat("#.#") var s = df.format((triggeringItem.state as Number)/1000) watt = new DecimalType(s)