diff --git a/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/handler/HomematicThingHandler.java b/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/handler/HomematicThingHandler.java index f04a1d8ddd7..542fac8073e 100644 --- a/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/handler/HomematicThingHandler.java +++ b/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/handler/HomematicThingHandler.java @@ -601,8 +601,10 @@ public class HomematicThingHandler extends BaseThingHandler { } else if (dp.isFloatType()) { newValue = decimal.doubleValue(); } + } else if (newValue instanceof String && dp.isEnumType()) { + newValue = dp.getOptionIndex((String) newValue); } - if (!Objects.equals(dp.isEnumType() ? dp.getOptionValue() : dp.getValue(), newValue)) { + if (!Objects.equals(dp.getValue(), newValue)) { sendDatapoint(dp, new HmDatapointConfig(), newValue); } }