diff --git a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java index 1264e913123..04f4e6521c3 100644 --- a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java +++ b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java @@ -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 */