boc-tothefuture / openhab-jruby

JRuby Libraries for Openhab
Eclipse Public License 2.0
6 stars 9 forks source link

Persistence quantify error when state_description no space separates format and unit #600

Closed jimtng closed 2 years ago

jimtng commented 2 years ago

When an item's state description doesn't include a space between the format and unit, e.g.

Number:Temperature TempItem "Temp [%d°C]"

UnitUtils.parse_unit failed to extract the unit, and as a result, quantify failed to unitize the returned value.

It works fine when there's space separating the format and unit.

jimtng commented 2 years ago

Apparently a space is required.