Hi kind people, I have the below rule to sync 2 lights which worked just fine (thanks Rich) with OH 2.2.
Now after changing to OH 2.4, it doesnt work. I have read the docs but have not managed to get even close.
rule "sync Front Lights"
when
Item SW2_01_2 changed or
Item SW2_02_1 changed
then
val newState = triggeringItem.state
if(SW2_01_2.state != newState) SW2_01_2.sendCommand(newState)
if(SW2_02_1.state != newState) SW2_02_1.sendCommand(newState)
end
Bellow is the error from the log
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'sync Front Lights': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.Number) on instance: null
Any help greatly appreciated.