This object is in archive! 

time comparison not working

W. Evens shared this problem 8 years ago
Known

Hello,


The rule below should only be executed at Sunrise but only if it is after 6:30.

Sunrise currently occurs around 5:35 so why is message sent every day (at Sunrise)?

  1. WHEN Scheduler [Sunrise]
  2. IF NOW > Time 6:30
  3. send message

Any explanation or advice is appreciated!


Wilfried.

Replies (7)

photo
1

Not tried. But i think you must use If time(NOW) > time(6:30).

photo
1

Hi John, good idea and quite logical: NOW could indeed be a date or time format. I'll try and provide an update tomorrow.

photo
1

It works!

Thank you John!


Just for information: The rule currently looks like:

  1. WHEN SCHEDULER [Sunrise]
  2. IF TIME OF: NOW > TIME 6:30
  3. SEND MESSAGE ...
  4. ... and open the blinds.

By the way, am I supposed to close this ticket somehow?

photo
1

I think you can not close this item. I do not know how to do it. Maybe someone from Zipato can do it.

photo
1

Hi Milan, that is correct. Blinds must be opened at sunrise, but not before 6:30 am. Another rule (which is not mentioned above) will open them at 6:30 (if they have not been opened already and if the sun is already up)

photo
1

Please find my rules attached.

Some notes:


Rule 1 (blinds up at sunrise) is triggered by scheduler daily at sunrise.

Rule 2 (blinds up at 6:30) is triggered by scheduler daily at 6:30

Messages in the rules or just for testing.

Blinds are still virtual as I'm awaiting my 433Mhz box to include the real ones :-)

photo
1

In the mean time, in stead of using variables to store information like Sun is up, Blinds are open..., I now use virtual HTTP sensors.


Advantages of Virtual HTTP sensors over Variables:

- They do not get reset when Zipabox has to be restarted.

- They are easily controlled.

Leave a Comment
 
Attach a file