Homematic Thing Can't convert FLOAT value '' with PercentTypeConverter

  • Platform information:
    • Hardware: Zotac
    • OS: Windows 10 * Java Runtime Environment: which java platform is used and what version
    • openHAB version: 4.0.3
      I have serveral Homematic Heater Thermostats and assigned items to the opening level with the type dimmer. The are all members of a group (gRadiatorventiloeffnung) with the member base type Dimmer and the aggregation function MAX. If the opening level of all mebers is for example 0% the value of the group is “0” although all of its members have the dimmer type.
      I have a rule to check if the value off the group is > 0 which turns on the heating pump.
if (gRadiatorventiloeffnungen.state > 0){
    Heizung_Pumpe_Radiator_aus.sendCommand(OFF)
}

The rule works fine, but for one member of the group I get the error message:
2023-09-17 12:55:51.388 [ERROR] [ternal.handler.HomematicThingHandler] - Can’t convert FLOAT value ‘’ with PercentTypeConverter for ‘000A1BE99B4B84:1#LEVEL’

I guess the problem is the conversion from % to float in the group. But why are the dimmer values converted at all und why do I get the error message just for one of the group members?

That guess is wrong :wink: That error comes from converting data sent from the central (CCU, Homegear or whatever you’re using) to OH item state. The central sent an empty string, which could not be interpreted as a number.

When exactly do you get that error, I suppose whenever the valve state changes? What central are you using? Looking at a TRACE log (log:set TRACE org.openhab.binding.homematic) to see what happens right before this error might give an idea.

Thank you!
Its too much information. Is it possible to send it to new log file?

I am using a CCU3 with raspberrymatic.

My suggestion would be reproducing the error, then copying openhab.log elsewhere, then opening that copied file and removing everything that’s more than a few seconds before the error.

Another approach would be not to rely on the group state:

val iCount = gRadiatorventiloeffnungen.members.filter[v|v.state instanceof Number].filter[i|(i.state as Number) > 0].size
if(iCount > 0)
    Heizung_Pumpe_Radiator_aus.sendCommand(OFF)

To get the magic:

gRadiatorventiloeffnungen // take the group Item
.members // get a list of the direct members
.filter[v|v.state instanceof Number] // filter to a list of all members which state is of type Number
.filter[i|(i.state as Number) > 0] // filter to a list which numerical state is greater than 0
.size // get the size of the list (i.e. how many items are in the final list)

If there is any Item in the group which state is not of type Number, the Group:MAX calculation will fail.
The rule code won’t, as it takes care of these Items (first filter).

I understand the thought behind the rule, but I don’t understand the syntax. Which language is that?
And it doesn’t solve the cause. How could the level of a homematic heater valve be not a number? The items linked to the levels shows correct values. The are all 0% right now.

It’s DSL code (same as you’re using).
There is a huge difference between Group:SUM and the piece of code, the Group:SUM will be not valid if any Item in the Group will fail to have a valid state.
The code, on the other hand, will filter those items, so there are only items with a valid state.
It will not calculate the maximum, but will simply count all items with a Number value other than 0.
Try it out. :slight_smile: It’s a one-liner…