The problem is caused by this method:
private static Encodable encodeFloat(Type type){
if(type instanceof DecimalType){
return new Real(((PercentType)type).floatValue());
}
throw new IllegalArgumentException("Cannot convert openHAB type " + type + " to integer");
}
The cast is wrong. As the if has proven, the value is of class DecimalType, not of class PercentType. Casting to DecimalType makes writing work again.
The problem is caused by this method:
The cast is wrong. As the
ifhas proven, the value is of classDecimalType, not of classPercentType. Casting toDecimalTypemakes writing work again.