Hi Everyone,
after migrating my OH2.5 instance to OH3 (Running as Proxmox Container on Debian & Openhabian / OH 3.3) everything is working fine, exept the rules for my remotes. I have spent some time trying to find a solution on Google and in the forum, but I am not able to pinpoint a solution. Probably I just don’t understand the explanations, as I am no developer.
Here is the code in question:
//Shelly Button 2 WoZi
rule "HM ShellyButton2"
when
Channel "shelly:shellybutton1:98cdac2c26cb:status#button" triggered
then
switch(receivedEvent.getChannel().toString()) {
case "SHORT_PRESSED": {
SteckdoseWoZiSuedOst.sendCommand (ON)
}
case "LONG_PRESSED": {
SteckdoseWoZiSuedOst.sendCommand (OFF)
}
case "DOUBLE_PRESSED": {
LichtEssen.sendCommand (ON)
}
case "TRIPLE_PRESSED": {
LichtEssen.sendCommand (OFF)
}
}
end
VC throws this error:
[{
"resource": "/Volumes/openHAB-conf/rules/remotes.rules",
"owner": "_generated_diagnostic_collection_name_#0",
"code": "org.eclipse.xtext.diagnostics.Diagnostic.Linking",
"severity": 8,
"message": "The method getChannel() is undefined for the type String",
"startLineNumber": 7,
"startColumn": 23,
"endLineNumber": 7,
"endColumn": 33
}]
I understand that there have been changes with “inherent variables”, yet I cannot figure out what a correct syntax needs to be. Maybe some of you can help me out here please?
Thanks a lot
Cu
Frank