Text format issues

Hi Igor,
I have been using your previous Legacy Rotini app for more than two of years with excellent results with OpenHAB.
Now I have started migrating the code to the new HomeHabit app.

I found one weird difference between Rotini and HomeHabit in the way they manage formatted strings:
In Rotini the Text widget was displaying the String as formatted in the OpenHab items file; in HomeHabit the equivalent Value Widget is displaying the String unformatted, causing many widgets to display weird values.

Example:
astro.items

*// Astro binding *
DateTime Sunrise_Time “Sunrise [%1$tH:%1$tM]” (gDateTime) {channel=“astro:sun:CasaVarazze:rise#start”} // shows the sunrise

With Rotini Legacy the value displayed was:
08:04

With Homehabit the value displayed is:
2019-12-28T08:04:00.00+100

As you can see, HH version is not friendly and cannot be displayed.

Hi @igor,
did you have a chance to look at this bug?

Hi @igor
I tested version 20, but the problem is still there.

Thanks for attention.

@hooh1967h yes, this hasn’t been addressed yet. OpenHAB does not provide data in formatted form, only in raw form, so the app would need to format it according to specified format. It should be possible to do, so I will see when can it be done.

Hi @igor
thanks for your reply.

But if OpenHab is providing data only in RAW mode why was this working with Rotini?
Has something changed in OpenHAB?

@hooh1967h Legacy dashboards were built on top of sitemaps, so OpenHAB formats values there by default. This version uses OpenHAB items API, which provides only raw value. It does provide specified format in addition to raw value, which should make it possible to replicate the same behavior as before.

@igor: Very clear.
Thanks for the explanation.

In OpenHAB I have some items with MAP TRANSFORMATION where 1=OPEN and 0=CLOSED. I cannot make these items work in Home Habit:

Contact cESPT3_R1 {mqtt="<[mqtt_broker:ESPT3/Relay/r1:state:MAP(inverted-contact.map)]"}

inverted-contact.map:
0=CLOSED
1=OPEN
CLOSED=0
OPEN=1
-1=OFFLINE
OFFLINE=-1

Is there any chance to have them working?

Does it not find these items in the app at all?

Hi @igor
It does find the items, but it does not report the correct status.
In other words, it does not take into account the transformation map.