Logos
(Rolf)
October 31, 2021, 9:44am
1
dear all
the state of item which should be % are not correctly presented. E.g. instead of 86% 0.86% is shown in the sitemap. Coding is as follows:
label="Stellwert Termostat [%.2f %%]"
Could anybody help on how to code the class formatter correctly?
Many thanks
rossko57
(Rossko57)
October 31, 2021, 10:15am
2
Start from what type of Item is involved.
Logos
(Rolf)
October 31, 2021, 10:36am
3
here we go
Text item=UG_Wohnen_Heizung_Stellwert_Status label="Stellwert Termostat [%.2 f %%]"
rossko57
(Rossko57)
October 31, 2021, 11:07am
4
Okay, you’re using a sitemap Text widget. But what type is your Item ?
rossko57
(Rossko57)
October 31, 2021, 12:03pm
6
I suspect you’ve linked your plain Number type Item to a number:dimensionless channel. The mis-match causes unexpected Item updates, as 75% gets converted to 0.75 (of one).
Logos
(Rolf)
October 31, 2021, 2:11pm
7
That could well be. However, I have no idea how to correct it. For your reference Things line looks like that:
Type dimmer : UG_Wohnen_Heizung_Stellwert_Status [ position="5.001:<3/1/3" ]
and items line looks like that:
Number UG_Wohnen_Heizung_Stellwert_Status "Stellwert Termostat" <valve> (UG_WN_HV) ["Status"] { channel="knx:device:bridge:AKH_UG:UG_Wohnen_Heizung_Stellwert_Status", widgetOrder="7", listWidget="oh-label-item"[iconUseState=true], stateDescription=""[pattern="%.0f %%"] }
Have you an idea what i would need to change?
rossko57
(Rossko57)
October 31, 2021, 2:15pm
8
Ah, a dimmer type channel. These yield percent type states. Why not link it to a Dimmer type Item?
Logos
(Rolf)
October 31, 2021, 3:27pm
9
this did the trick. Thank you very much