[homekit] Allow Long type in configuration for numbers (#13509)
I.e. if it's set from a Ruby script Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
parent
3aac15df62
commit
ccc199f429
6
bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitTaggedItem.java
6
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user