OH3: How to get Humidity to display (correctly) in Widgets, Analysis & Badges at the same time

I’ve been struggling to get my humidity readings to display correctly across the different endpoints.

My data source is the Netatmo binding, though I think the underlying issue is a lack of knowledge on the general way these things work on my part :wink:

Option 1:

With the item defined using type: Number:Dimensionless, Category: Humidity, Semantic Class: Point, Semantic Property: Humidity the item widget and the list of items shows the humidity as desired: 36% and this also shows up correctly in widgets.

However, clicking analyze shows the plot with the values ranging from 0.0 to 1.0 with units: %

In the locations page the ‘at a glance badge’ for humidity does not show up.

Option 2:

With the item defined using type: Number:Dimensionless, Category: Humidity, Semantic Class: Measurement, Semantic Property: Humidity the item widget shows the humidity as ‘Err’, though in the big list of items it is shown as 0.36.

In analyze it now shows the plot with the values still ranging from 0.0 to 1.0 but with units: %unit%

However… in the locations page the ‘at a glance badge’ for humidity does now show up, with the correct display of 36% as well.

I think for that badge to work the ‘measurement’ semantic class is required. But what do I need to do then to make widgets show 36% instead of Err or 0.36? (And ideally have the graphs also show 0…100%)

1 Like

I wish I knew what I did… but using the second option both widgets and badges now show the correct values. I’m guessing this happened after the binding triggered an actual update of the humidity value.

In addition to working with the semantic tagging which seemed to do the trick here, you can set how the value is presented almost everywhere in MainUI by setting teh State Description Item metadata. Set the pattern using the same way you’d set a label on a sitemap (Items | openHAB). That pattern usually will be applied across the board.

1 Like

@IfDanElse I could solve the Issue with displaying 36.0% instead of 0.36% by using ‘Measurement’ as semantic class & ‘Temperature’ as property class

Eventually it did work with Humidity as well. I think the confusion came from the delay in ‘all parts’ responding to that change.

It seems something like this happens:

channel->t1->item->t2->display

With t1 and t2 being transformations of the data.

When I switched class from Point to Measurement, t2 applied that change to what ever was in the item and that failed. Only after the channel got an update, t1 executed with the new setting as well, putting a value in the item that t2 was able to transform properly. (Netatmo only updates every 10 minutes or so)

(I should probably spent some time on learning the proper terms before making posts like this.)