diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/ScriptExecution.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/ScriptExecution.java index 665c1e657d8..c235db29b69 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/ScriptExecution.java +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/ScriptExecution.java @@ -46,7 +46,7 @@ public static Object callScript(String scriptName) throws ScriptExecutionExcepti ModelRepository repo = ScriptServiceUtil.getModelRepository(); if (repo != null) { String scriptNameWithExt = scriptName; - if (scriptName.endsWith(Script.SCRIPT_FILEEXT)) { + if (!scriptName.endsWith(Script.SCRIPT_FILEEXT)) { scriptNameWithExt = scriptName + "." + Script.SCRIPT_FILEEXT; } XExpression expr = (XExpression) repo.getModel(scriptNameWithExt);