[SOLVED] OH3 HabPanel with SVG/angular

Hey guys,

I took the time to upgrade my OH2 installation to OH3.
As a visualization I’m also using a wall-mounted tablet that displays a dynamic SVG in HabPanel.

This SVG contains angular expressions in the following form:
ng-bind="(itemState('Power_WP') | number:1)"

These are no longer shown in HabPanel. If the formatting | number:1 is removed, the value shows up in HabPanel. But then the formatting settings from the Item definitions are not used, which makes the display very messy - depending on the current value.

Was there any change or different approach for formatting that I’m not aware of?


Hello again,

so as it turns out, the change was not in HabPanel or Angular, but in my configuration.
I’m now using Units of Measurement (UoM), which are included in the ItemState.
As a consequence, number formatting fails and nothing gets displayed.

I worked around this by using a split on the item state like this:
(itemState('Power_WP').split(' ')[0] | number:1)

So I’m marking this as solved.


1 Like

That was exactly, what I needed!
Thank you! :slight_smile: