[automation] Correctly map the state context variable of the ItemStateEvent to the implicit var newState (#1809)

Fixes #1802 

Signed-off-by: Kai Kreuzer <kai@openhab.org>
pull/1817/head
Kai Kreuzer 2020-11-13 07:29:56 +01:00 committed by GitHub
parent c2b3885e9e
commit 7d2a505e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ public class DSLScriptEngine implements javax.script.ScriptEngine {
public static final String MIMETYPE_OPENHAB_DSL_RULE = "application/vnd.openhab.dsl.rule";
private static final Map<String, String> implicitVars = Map.of("command", "receivedCommand", "event",
"receivedEvent", "newState", "newState", "oldState", "previousState", "triggeringItem", "triggeringItem");
"receivedEvent", "state", "newState", "newState", "newState", "oldState", "previousState", "triggeringItem",
"triggeringItem");
private final Logger logger = LoggerFactory.getLogger(DSLScriptEngine.class);