[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
|
@ -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…
Reference in New Issue