Some EnOcean sensors (e.g. eltako Multisensor MS) seem to return floating point numbers for the channels illumination, illuminactionWest, illuminationSouthNorth, and illuminationEast but obviously are handled as decimals. Thus, I get following errors:
2020-12-30 09:45:01.137 [WARN ] [e.internal.SseItemStatesEventBuilder] - Exception while formatting value \'4705.882352941177 lx\' of item Wetterstation_SunEast with format \'%d %unit%\': d != java.math.BigDecimal
2020-12-30 09:45:01.141 [WARN ] [e.internal.SseItemStatesEventBuilder] - Exception while formatting value '7647.058823529412 lx' of item Wetterstation_SunSouthNorth with format '%d %unit%': d != java.math.BigDecimal
2020-12-30 09:45:01.145 [WARN ] [e.internal.SseItemStatesEventBuilder] - Exception while formatting value '3529.4117647058824 lx' of item Wetterstation_SunWest with format '%d %unit%': d != java.math.BigDecimal
Seems to be a similiar issue to #149…
The current implementation in channels.xml uses format strings based on integer values (%d) and not float (%.1f):
<item-type>Number:Illuminance</item-type>
<label>Lux</label>
<description>Illumination in lux</description>
<state pattern="%d %unit%" readOnly="true"/>
</channel-type>
<channel-type id="illuminationWest">
<item-type>Number:Illuminance</item-type>
<label>Sun West</label>
<description>Illumination in lux</description>
<state pattern="%d %unit%" readOnly="true"/>
</channel-type>
<channel-type id="illuminationSouthNorth">
<item-type>Number:Illuminance</item-type>
<label>Sun South/North</label>
<description>Illumination in lux</description>
<state pattern="%d %unit%" readOnly="true"/>
</channel-type>
<channel-type id="illuminationEast">
<item-type>Number:Illuminance</item-type>
<label>Sun East</label>
<description>Illumination in lux</description>
<state pattern="%d %unit%" readOnly="true"/>
</channel-type>
I completely added thing and items via UI.
Am I right? How to fix?
Thx