[SOLVED] How to format items in OH2?

I try to present the time item dvcKNXIPGatewayPing of a network device by adding it to my sitemap.

The line

Text item=dvcKNXIPGatewayPing

returns the item’s label but no value. How can I translate the item’s value to a text string? Adding the item to the .item file and a format parameter would probably help. But this would mean that I have to define the item twice - through the paper UI as well in the .item file.

Is this the approach in the current development state of OH2 or is there a better alternativ?

Thx, G.

USe the same way as in OH1 add a format String to the label like

Label: “Gateway Ping [%s ms]” then if the item is a string the ping time is diaplayed.


Stupid me! Thanks, this works well!