Dann würde ich die Variante empfehlen, die ich auch anwende:
items:
rules:
items:
Code:
String LgTvNTV "NTV" <video> { channel="harmonyhub:device:HarmonyHub:24582546:buttonPress" }
Switch LgTvNTV_Alexa "Name den Alexa erkennen soll" [ "Switchable" ]
Code:
rule "Fernseher an/aus"
when
Item LgTvNTV_Alexa received command
then
if (LgTvNTV_Alexa.state==OFF) {
LgTvNTV.sendCommand("PowerOff")
}
else if (LgTvNTV_Alexa.state==ON){
LgTvNTV.sendCommand("PowerOn")
}
end



Kommentar