diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitTaggedItem.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitTaggedItem.java index 522b063d1..0ba3c2e63 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitTaggedItem.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitTaggedItem.java @@ -295,6 +295,12 @@ public class HomekitTaggedItem { if ((value instanceof Double) && (defaultValue instanceof BigDecimal)) { return (T) BigDecimal.valueOf(((Double) value).doubleValue()); } + if ((value instanceof Long) && (defaultValue instanceof Double)) { + return (T) Double.valueOf((Long) value); + } + if ((value instanceof Long) && (defaultValue instanceof BigDecimal)) { + return (T) BigDecimal.valueOf((Long) value); + } } }