- Platform information:
- openHAB version: 3
- Issue of the topic: Migrating from DSL Rules to Javascript,
- Please post configurations (if applicable):
I want to migrate the DSL rule below to javascript.
How can I access the variable receivedCommand in javascript?
Could you please help.
val actions = getActions(“lcn”,“lcn:module:aebcf08c79:S000M011”)
switch (receivedCommand) {
case OFF: {
actions.hitKey(“A”, 1, “HIT”)
logInfo(“Aussenlichter”, "Set to OFF ")
}
case ON: {
actions.hitKey(“A”, 2, “HIT”)
logInfo(“Aussenlichter”, "Set to ON ")
}
}