Error parsing floats with negative exponent?


My PV inverter sends floats with a negative exponent that cannot be parsed by openHAB 3.3:

2022-09-08 20:51:01.336 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Incoming payload '5.605193857299268e-45' not supported by type 'NumberValue'

Am I missing something here or is this a bug?

Thanks for any insight!

Seems to be a limitation that exponent notation is only supported if you use a capital ā€˜Eā€™. I tried it with 5.605193857299268E-45 and it was parsed correctly. Might be a candidate for a change request / issue in github.

edit: You could apply an incoming value transformation (e ā†’ E) to fix it, e.g.


Thanks @absalom for the explanation and the workaround.
Had the same thought applying a transformation on the channel, but you even provided the regex in your edit, thanks!

Issue is here: [mqtt] Parsing floats with a lowercase "e" separating mantissa and exponent fails Ā· Issue #13373 Ā· openhab/openhab-addons Ā· GitHub