Formatting of channel data too restrictive

Two of my sensors send channel values as floating point numbers which raises exceptions because the EnOcean binding confines humidity and totalusage to be integer values (in channels.xml).

That’s what transformations are for. You probably need to use a JavaScript transformation to round the values to the nearest integer.

Alternatively you can use a rule to round it.

Thank you for this hint. I am on a steep learning curve with openHAB and will look into this. This would be a great workaround.

Nevertheless I think that this is a bug and have submitted a bug report. Since EnOcean devices send floating point values, the output formatting should match this.

That’s not how openHAB works though. All numbers are stored as BigDecimal which is floating point. It doesn’t matter what the device sends. The whole point of openHAB is to normalize everything so you don’t have to know or care that it’s an EnOcean device verses a Zwave device or a KNX device. It’s all the same.

That sounds great. And that is exactly what I would expect. Unfortunately, that is not happening in this case. The format string expects an integer. I have located the cause of the problem and have submitted a bug report which I was asked to do by J-N-K.