[SOLVED] Timer not work after upgrade to 2.3

I upgrade my OH2.2 to 2.3.
All works fine, but the timer in my rules not working after upgrade.
Here my timer rule:

import org.openhab.model.script.actions.Timer

var Timer timer

rule "If NH_TV_WZ more then 2 min not available, send OFF to WZ_Power_TV"
when
    Item NH_TV_WZ changed
then
    if(NH_TV_WZ.state==OFF) {
      timer = createTimer(now.plusSeconds(120)) [|
        sendCommand(WZ_Power_TV, OFF)
      ]
    } else {
      if(timer!==null) {
        timer.cancel
        timer = null
      }
    }
end

There is no error in log.
Know any one why the timer not work under 2.3?

First of all I think there is no need for the import line. Delete this line.
All of my timers still work after the upgrade to 2.3.

I test it with and without import line.
It will not work.
Can you post a example of your timer rule?

You need to add a space after the [ of the timer lambda.

var Timer timer

rule "If NH_TV_WZ more then 2 min not available, send OFF to WZ_Power_TV"
when
    Item NH_TV_WZ changed
then
    if(NH_TV_WZ.state==OFF) {
      timer = createTimer(now.plusSeconds(120)) [ |
        sendCommand(WZ_Power_TV, OFF)
      ]
    } else {
      if(timer!==null) {
        timer.cancel
        timer = null
      }
    }
end
1 Like

Nope, no space needed.
After the upgrade i restart only the oh service.
Now i reboot the server and it works! Damn shame :wink:

1 Like