pedrolima
(Pedro Lima)
December 13, 2020, 4:49pm
1
So I have a Switch with many cases, everything works flawlessly.
Yesterday I wanted to use the same “then” for two cases so I proceeded accordingly as I’ve seen here .
Problem is, this did not work.
I even tried using : instead of the suggested comma. Did not worked.
Also tried without anything, having them like:
case “BLA”
case “BLE” : {
Did not worked as well.
If I leave one case for each then as I had previously, everything works like a charm though.
Any suggestions?
EDIT: I’m using OH v2.5.9
See this example of mine:
switch (System_SSH_LetzteFehlgeschlageneIP.state.toString) {
case "1", case "2" : { text = text + "(RPi2Helper)" }
case "3" : { text = text + "(Asterix)" }
default: { text = text + "(unbekannt)" }
}
This works perfectly fine for me
2 Likes
pedrolima
(Pedro Lima)
December 13, 2020, 5:13pm
3
I really can’t understand this…
I swear I had tried this (like in the link I’ve shared) and it did not worked.
Tried again now… IT WORKED!
Welp… thanks. lol
1 Like