I have a simple map transformation like below:
0=OFF
1=ON
I configure an Number item and transform to OFF/ON as following:
Number Outdoor_sensor "Outdoor Sensor [MAP(OnOff.map):%s]" (gHue) {channel="........."}
However for some reason some times the number item return a double number 0.0 or 1.0 which makes the transformation fail. I thought I could format the number to an integer before passing to map transformation like below:
Number Outdoor_sensor "Outdoor Sensor [MAP(OnOff.map):%d]" (gHue) {channel="........."}
However it complains that it needs a string for map to work.
Is there any way to format a number with number of decimals before passing to a map function?
Many thanks in advance!