[APP][Pro] Better Logic Library - Just some better logic, variable and library management

Hi,

I’m starting with my Homey Pro 2023 … added lights, dimmers, shutters, etc … and created some simple flows and some advanced flows.

Now struggling with time calculation for a new flow that should steer my shutters based on the sunset time and a fix time (20u00): Time to go down = ((Sunsettime - 20:00)/2) + 20:00

Example1 when Sunset at 22u00: ((22:00-20:00)/2) + 20:00 = 21:00

Example2 when Sunset at 18u00: ((18:00-20:00)/2) + 20:00 = 19:00

I’ve tried to find a solution with the Better Logic Library app … but, unfortunately, my knowledge isn’t (yet) to a level to solve my challenge.

Can anyone put me on the right track with BLL ?

Goal is to use this in an advanced flow together with other input/conditions/…

Thanks !

For date/time calculation you might consider “epoche time”, the number of miliseconds past since 00:00:00 01-01-1970. BLL has several conversions for such calculations.
See [APP][Pro] Better Logic Library - For Users - #185 by Arie_J_Godschalk