diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-scripts.js b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-scripts.js index 5bda9a428f..ca6c9c5176 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-scripts.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-scripts.js @@ -285,7 +285,7 @@ export default function defineOHBlocks_Scripts (f7, isGraalJs, scripts) { if (type === 'asNumber') { return [`event.${contextInfo} !== undefined ? parseFloat(event.${contextInfo}.toString()) : undefined`, javascriptGenerator.ORDER_ATOMIC] } else if (type === 'asQuantity') { - return [`event.${contextInfo} !== undefined ? Quantity(event.${contextInfo}.toString() : undefined)`, javascriptGenerator.ORDER_ATOMIC] + return [`event.${contextInfo} !== undefined ? Quantity(event.${contextInfo}.toString()) : undefined`, javascriptGenerator.ORDER_ATOMIC] } else { return [`event.${contextInfo}?.toString()`, javascriptGenerator.ORDER_ATOMIC] }