Running the latest 3.1 snapshot and I’m fighting with the following problem:
This rule here…
var String results = ""
logInfo("pyduofern_az_spielplatz","Empfangener newState=" + newState)
switch (newState)
{
case UP:
{
results = executeCommandLine(Duration.ofSeconds(5),"sudo", "python3", "/home/openhabian/.local/bin/duofern_cli.py", "--up", "495dbd", "--configfile", "/etc/openhab/_duofern/.duofern.json")
logInfo("pyduofern_az_spielplatz","Command: UP, RC=" + results)
}
case DOWN:
{
results = executeCommandLine(Duration.ofSeconds(5),"sudo", "python3", "/home/openhabian/.local/bin/duofern_cli.py", "--down", "495dbd", "--configfile", "/etc/openhab/_duofern/.duofern.json")
logInfo("pyduofern_az_spielplatz","Command: DOWN, RC=" + results)
}
default:
logInfo("pyduofern_az_spielplatz","Unknown state: " + newState)
}
…always ends up in the “default” part of the switch statement.
Logfile:
2021-01-10 19:42:32.717 [INFO ] [model.script.pyduofern_az_spielplatz] - Empfangener newState=ON
2021-01-10 19:42:32.727 [INFO ] [model.script.pyduofern_az_spielplatz] - Unknown state: ON
Any ideas what I could do to make the switch statement based on “newState” work?