[SOLVED] createTimer (tomorrow noon) in a rule

Yes, I have searched the forum :wink:

Q: How do I use createTimer() to create a timer for tomorrow, 11 o’clock ?

Background: I have a heatpump wich does get a lot of on-off cycles when it is not really cold outside. I switch it off when it cycled 10 times a day and want to re-activate it the next day at 11 o’clock. CreateTimer (now.plus) is not good since the time when the 10 cycles are reached is different for each day.

My rule now is:

rule "OFF"
    Item Vito_cycles changed  
if (Vito_cycles.deltaSince(now.withTimeAtStartOfDay) >10){
        Vito_ONOFF.postUpdate(1) // off
        VitoTimer=createTimer(now.plusMinutes(21)) [
                Vito_ONOFF.postUpdate(2)  // back to on.

Remove the timer and write a second rule with cron trigger at 11 o’clock that re-activates your pump.

That will trigger every day
I think the OP wants the option to trigger that on demand


See: DateTime Conversion Overview

How about
That should do it, right?

1 Like

Yes but you’ll have problen with the daylight saving time changes:


will take care of that

1 Like


Please mark the thread as solved, thanks