Time calculation from sun down time to end time to show seconds countdown for turn off lights and show time on dashboard

Kevin_Ponsen
Tue, 28 Nov 2023 19:43:19 +0000
Questions & Help

i have read many option on forum but i cant figure it out how or what to do to get it to work
i want to calculate time from start sundown to self set end time 22:30

used variables are
text / (Tijd Week) (set to 22:30)
text / (Tijd Weekend) (set to 00:30)
number / (Tuin Timer) (set in seconds)
text / (Tijd Nu)

IF (Sundown in 0 min) then Set (Tijd Nu) with current time
IF weekday then (Tijd Week) - (Tijd Nu) = result in minutes (*60) = seconds
else (Tijd Weekend) - (Tijd Nu) = result in minutes (*60) = seconds
then Set Result seconds to (Timer 1)

for example
sundown 18:30 (time)=18:30
end time 22:30 (endtime)
remaining time 22:30 - 18.30 = 4 hour * 3600 = 14400 sec (timer set 14400)

end result is then something like this

can someone please explain me how to make something like this or know what i can use for this to

6 posts - 2 participants