Page 1 of 1

Determine time left until next alarm?

Posted: 17 Feb 2018 16:26
by usersean
Hello there, I'm trying to make a flow that will check my alarm and tell me how long left until it is going to go off (Example: 5 hours and 2 minutes from now) - but the init alarm variable only seems to return the actual timestamp. I can't find any functions like the ones that exist in Java (toHours(),toMinute etc.) you'd usually use to do this.

Am I missing something or is there no similar functions to do this?

Cheers.

Re: Determine time left until next alarm?

Posted: 18 Feb 2018 04:07
by anuraag
Use a script with following after Init Variable Next Alarm

Code: Select all

duration = getDurationString(next_alarm - triggertime)

Re: Determine time left until next alarm?

Posted: 19 Feb 2018 01:21
by usersean
Oh wow I totally missed that, thank you kindly.