Hi guys
As always, I have tried to search first, but I’m getting just old style (OH2) samples, so I would really appreciate a bit of help.
I have have upgraded from OH2.5 to 3 and pretty much lost all my home automation I did in 2.5. It’s no big deal, as I think I figured out main issues is with time and date, so once I figure out how to convert these things to OH3 compatible style, it’s just a matter of find and replace. But I would need some help with figuring out how to convert those timers to OH3 style
Whole bunch of my rules for controlling blinds include timers for delays, which currently looks like:
var int WaitDuration1 = (10)
var DateTime endTest1 = now.plusSeconds(WaitDuration1)
createTimer(endTest1)
[|
logDebug("f1-kitchen-sunrise","Kitchen blind set to 10")
]
With this it would have 10sec delay after previous command to execute next command (for sample command is just LogDebug). It worked perfectly in OH2.5, but after upgrading to OH3 this doesn’t work anymore.
Anyone who would have similar timer done the way it would work in OH3? I went through time/date explanations but honestly didn’t really get idea how to change this to work with Java time instead of old Jodatime.
Thanks for help!