OH3.1 - Calculated Item value not displayed in sitemap

  • Platform information:
    • Hardware: RasperryPi 4 4GB RAM
    • OS: Ubuntu 21.04
    • Java Runtime Environment: OpenJDK14
    • openHAB version: 3.1.0

Issue:
An Item value is not displayed on a sitemap widget, no matter what widget I use. This Item value is calculated with Jython script based on values from another Item.

  1. Calculating PVPower as a sum from two PV Strings. This PVPower value is visible in the Item as well on PaperUI and HABPanel widgets.
    image
    image

On Sitemap this value is not displayed.
image

Any Idea why Sitemap widgets behave different? I tried with several value Types: String, Number, Number:Power but no difference…

Look into your state presentation metadata, remembering “don’t ask, don’t get” as a rule of thumb about displays.

Im not sure I understand…
What do you want me to check?

Your Item has metadata. A section of that metadata controls how the Item state is presented in the UI. The state presentation section. The key property there is called pattern.

First of all, read the installation prerequisits and install the correct Java version.
openHAB 3 requires Java 11 (Zulu 11 recommended), no higher, no lower version.

Because you explicitly have to tell sitemaps to and didn’t.
Add [%.1f] to the label either of the item or in sitemap label=...

2 Likes

Yepp, that did the trick.
Adding [%.1f] to the Item Label was it.

I just found out its OpenJDK11… For some reason I was under the impression its 14 but its not.
Nevertheless, its solved already. Thanks for the sidenote

1 Like