Alarm set on 11:59 in stead of time variable

47 views
Skip to first unread message

Guy Forssman

unread,
Jul 13, 2021, 4:04:49 AM7/13/21
to Automate
Hi there,

I was altering the https://llamalab.com/automate/community/flows/39141 .

I added several log append bloks to learn what this flow is doing.

LOG Append ="Before Atomic +" ++ title ++ " at " ++ dateFormat(time - 300, "datetime") ++ dateFormat(stoptime, "datetime") ++ time

I don't understand the block Atomic load + =time > stoptime ? time - stoptime : 0

LOG Append ="After Atomic + " ++ dateFormat(time, "datetime") ++ dateFormat(stoptime, "datetime") ++ time

Alarm add =++dateFormat(time, "datetime")

The alarm always get set at 11:59? Can somebody help me
Best regards
Guy

Bushmills

unread,
Jul 14, 2021, 9:25:48 AM7/14/21
to Automate
"time > stoptime ? time - stoptime : 0"    should be equivalent to     "max(time-stoptime, 0)"
Reply all
Reply to author
Forward
0 new messages