I’d like to activate my roller shutters at dusk for which astro-binding seems to be the way. So I created an channel/item “Dusk” which delivers something like “2021-04-19T21:40:00.000+0200”.
One (probably unnecessary complicated) way to proceed might be: (Javascript, I don’t know Java at all)rule which triggers every minute →
if (Date.now() == parseInt(items["Dusk_Start"])) { ACTION;}
The problem is that Date.now and Dusk_start don’t fit together; date.now delivers milliseconds, dusk something else entirely. With a lot of hassle I could possibly extract hours and minutes of both and compare them.
But I’m sure for such a common request there is a much simpler solution. Could you tell me which?
(By the way, I only have (limited) experience with OH3, no OH2)
This looks quite like the thing to do, but I’m totally unfamiliar with that. Looks like some OH2-approach to me; where would I write such text?
I’m working with this environment: