[jssscripting] Fix JS Quantity to Java QuantityType conversion (#16106)
Regression from https://github.com/openhab/openhab-js/pull/312. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This commit is contained in:
parent
0a2f53537c
commit
5eecaff637
|
@ -125,8 +125,8 @@ public class OpenhabGraalJSScriptEngine
|
|||
v -> v.getMember("rawItem").as(Item.class), HostAccess.TargetMappingPrecedence.LOW)
|
||||
|
||||
// Translate openhab-js Quantity to org.openhab.core.library.types.QuantityType
|
||||
.targetTypeMapping(Value.class, QuantityType.class, v -> v.hasMember("raw") && v.hasMember("toUnit"),
|
||||
v -> v.getMember("raw").as(QuantityType.class), HostAccess.TargetMappingPrecedence.LOW)
|
||||
.targetTypeMapping(Value.class, QuantityType.class, v -> v.hasMember("rawQtyType"),
|
||||
v -> v.getMember("rawQtyType").as(QuantityType.class), HostAccess.TargetMappingPrecedence.LOW)
|
||||
.build();
|
||||
|
||||
/** {@link Lock} synchronization of multi-thread access */
|
||||
|
|
Loading…
Reference in New Issue