Doing it smarter - help with rule code rollershutter automation

But you don’t ever check it again. You need to recalculate TempAussDiff after the five minutes to see if the diff is still < 3. Otherwise all you are doing is waiting five minutes and using the TempAussDiff calculated five minutes ago.

And like the comment says, you should never sleep for more than 500 msec. Use Timers if you need a longer amount of time. This is what is shown above. See (OH 1.x and OH 2.x Rules DSL only] Why have my Rules stopped running? Why Thread::sleep is a bad idea for details.

1 Like