openHAB 3.4 Release discussion

Set a state description for the item with the proper unit.

I just went through the release notes and found this under “Breaking Changes that Require Manual Interaction after the Upgrade”:

Core Runtime
Default units have been added for all dimensions. A state description defining the unit should be added to each item that uses a different unit.

I think this is what you are referring to, right?

I must admit, that I am lost at that point as I wasn’t able to find a place in the OpenHAB UI to define those descriptions :pensive:

Could you give me a pointer to the page where I can define this?

Thanks a lot,
Björn

Settings → Items → (item name) → Add Metadata → State Description

Thanks a lot!
That indeed did the trick!

I added “%.3f Wh” as “Pattern” and now it is displayed correctly and even stored again correctly in InfluxDB:

And I am now able to add multiple images per post :slight_smile:

3 Likes

Anyone got an idea what is the problem here:

Thanks, BR

Hello all,

I created a new topic than since the OH3.4 updated the rules still not running

Have look here for details:

I use three types of EnOcean devices. Lights, dimmers and rollershutters. With openHAB 3.3 everything worked as desired.
But after the update to openHAB 3.4 the dimmers and rollershutters are only shown as switches.
Previously, I had a slider for the dimmer. Now a switch is displayed, which of course does not work.
At the rollershutter I had the up/stop/down buttons. Now a switch is displayed, which of course does not work either.
Only the lights (switches) still work.
Does anyone have any ideas?

The unit of measurement handling in OpenHab always confused me.
Does the StateDescription.Pattern (“for display purposes”) property effect how a value is stored in persistence?
I would asssume that this pattern is applied to all values retrieved from persistence.

Going on a tangent here, but what I would like to have is a simpler way of using the state description pattern to display units. I’m not a programmer, I don’t know what to type to properly show units correctly. For the longest time this blew my mind because I wrote “Watt” or “%” and it didn’t display properly. I can’t guess the best way, but I’d love to have a sort of a click box where I could simply pick the unit from a list and openHAB would add the correct string needed to show the units for display purposes.

3 Likes

C’mon, it is all in the docs.

Going back to openHAB 2.x, we already had the option to define state descriptions :

"Outside [%.2f °F]"

In general, the syntax did not change, it was just extended.

2 Likes

Yes! Of course, now I know that. But it wasn’t my first thought to check when I started out.
What I’m saying is that it could be a bit better/easier/cleaner to do this in the UI, instead of having to guess what to do or where to go.

Edit:
Also, all of the examples in the docs are for configuration files - I didn’t know how to use those examples with the mainUI and metadata. :confused:

Maybe a link in the state description saying “if you’re not sure what to put here check this page “ - this alone would have saved me a fair amount of troubleshooting time.

But if we could have a tick box (or similar , something visual to help guide users in choosing it) to select the unit we wouldn’t need to look at the docs. Just select “watts”, another one to pick watts or Kwatts or something.
(yes I’m over simplifying, this isn’t as easy as that, just an example!)

Edit 2: humm in hindsight this isn’t a good place for this post - should I copy this to the 4.0 wishlist post instead???

If you’re using the web GUI, I think this is a very reasonable request/idea.

1 Like

yes

In OH 3.4 and before, yes. The state description pattern does more than just dictate how it’s displayed. Indeed, that’s the unit that persistence assumes when persisting and restoring.

In OH 4 there is ongoing work to separate state description so it only impacts how it’s displayed and an alternative mechanism to control the actual unit series by the item, persistence, etc.

1 Like

Thank you, Rich!
Looking forward to OH 4

Would a link to OpenHAB docs State Description already make a difference?

Does anyone know if there is a known bug in the UI?

What kind of bug ? You need to be more precise asking such a question.

Some feedback from my update from 3.4.0 to 3.4.1 from yesterday.
Here it seems that OH and the Addons got an update.
It was needed from me, to do an manual reboot otherwise some Items were not displayed.
Also I saw, that Values and Items from my Shelly TRV Thermostat were not working.
The only way was, to delete the Shelly TRV as a thing an create them new.
Now the values are back and it seems that it works.
What else I need to look on it?

Is there a changelog from the Shelly ADDON from 3.4.0 to 3.4.1 ?

BR
Jochen

No change about Shelly binding in 3.4.1.