Hello,
i have some understanding problem with this rule:
rule "Kodi Licht"
when
Item LichtKodi received command
then
logInfo("Kodi", "received Command = " + receivedCommand.toString) /// just to check if the command is correct
if (receivedCommand == 'ON') {
gLichter_EG.allMembers.forEach(light | light.sendCommand(OFF))
piCoreK_power.sendCommand(OFF)
logInfo("Kodi", "ON")
}
if (receivedCommand == 'OFF') {
sendCommand(Licht_Esstisch, ON)
logInfo("Kodi", "OFF")
}
end
this works with item
String LichtKodi
output is
2020-11-26 21:08:55.109 [INFO ] [.eclipse.smarthome.model.script.Kodi] - received Command = OFF
and the expected commands
but nothing happens when items is defined as Swtich
Switch LichtKodi
output is still
2020-11-26 21:14:34.354 [INFO ] [.eclipse.smarthome.model.script.Kodi] - received Command = OFF
, but no commands are executed…
what am i missing? for now i’ve set the triggerItem to “String” and it works, but i really would like understand what i’m doing wrong…