Hi all,
I was wondering for quite some time why a number item when feed by a PercentType would always be displayed as a value between 0 and 1 e.g. 0.24 and not 24.
This seems to be idependant of the UI.
Example using BasicUI and KNX:
item:
Number ventilPosition "Ventilposition [%.2f %%]" (gVentilPos) { channel="knx:device:bridge:regler:ventilPosition" }
displayed is 0.24 % expected: 24.00 %
Only when I modify the NumberItem.java to have PercentType.class as an accepted type I’ll get the expected result. Since this seems to be around for a long time and I couldn’t find anything in this forum: am I missing something here?
I sure got that. But …, making number item accept PercentType solves this (my) issue.
I’m just not sure why this wasn’t done before and if this change would have side effects.
Doesn’t make a lot of sense.
There is a Number:Dimensionless Item type exactly intended for arbitrary “ratios” like % or ppm.
But for actuators like dimmers, speed controls, positioners, where it is limited to 0-100% this is exactly what the dimmer/rollershutter types are for.