OH3 how to format numbers in UI?

Feel bit lost, as I’m oh2-file-edit-type-of-guy but wanted to give a shot of OH3 UI, it’s quite ok besides few things, but I can’t really figure out how to achieve equivalent of

Number Item "Some name [%.0f %%]"

in OH3 UI? There is Unit of Measurement in the thing menu when channel is defined, but it is just adding suffix to the value.
Is there a way how to format 12.2 to 12 via GUI?

Yes there is. Add thw state description metatdat to the item. The option Pattern is the right one. Just add %.0f %% and it is done.


thank you!
I was wondering what metadata are doing :wink:


is it also possible to calculate in a pattern? I would like to multiply a value x100, for excample.

I was able to change the display of “1000 Wh” into “1 kWh” by using the pattern %.2f kWh form my Energy item. The Unit of Measurement support does the job and converts the value according to the Metric Prefixes.

Unfortunately it does not work in the way I do it.

I have an item RPiCPU_Load_Number and I would like to display its value in percent.

Therefore I added in th State Description %0.f %%, but nothing changed.

Is this the way you described it?

What is displayed?

The value is displayed in the same way, without any percent, e.g 42.3.

I would like to get 42 %.

Try making it a Number:Dimensionless

Thanks for the hint, but after I rebooted the system the display was correct.