Displaying item value leveraging "Item-Steuerung" widget in Android app ignores formatting

Hi there,

I am using the latest version of the OpenHAB Beta app for Android and I just want just to display an item value on my Android Desktop without doing any action.
Hence I “misuse” the item control widget “Item-Steuerung” and just put a blank into the custom action. The item value is displayed when checking the option: “attach current status to name”. As you can see in the screenshot it basically works but it does not recognize the item formatting.

I would already be happy if someone can show me if there is a way to format the item value for my use case.
Another option could be to add a new widget to just display an item value with the correct formatting :slight_smile:

Thanks for any advice on how to solve my problem.


do you use openHAB 3? If so you can try to add a “State Description” metadata to the item at https:///settings/items/

Thank you for your quick response!

I am using old school item files where I already have set the value formatting:

Number:Dimensionless PV_Batt4Widget "PV-Batterie [%.1f %%]" (gPV) { channel="http:url:echselrichter:Batterieladung" }

but I have also added the format string to the item state description via the OH3 UI:

but the widget still looks the same :thinking:

This is a bug in the app. The widget code makes no attempts at formatting when converting the item state to a string here.

1 Like

I opened State formatting not applied in home screen widget · Issue #3060 · openhab/openhab-android · GitHub to track this issue.

1 Like

Thank you @mueller-ma for considering my finding and my apologies for the late response!

Another question/idea: Currently I am “misusing” the “Item-Steuerung” (item control) to display the value of an item … would it make sense to add a “read-only” item display widget for a minimal dashboard on the Android desktop for one to maybe four or six values to have a quick view on the value of one or more item/s?

I opened a PR that will format numbers: Format number states in widgets by mueller-ma · Pull Request #3110 · openhab/openhab-android · GitHub

I think it would make sense to add a multi-item widget where each item can be read-only or read-write. Feel free to open a feature request on GitHub. I probably won’t have time to implement this soon, though.

1 Like

@mueller-ma Thank you for considering this request even when it takes a while :slight_smile:
I am currently using the existing widget as it is :+1:t2: I will open the request.