Create countdown based on dialogue entry to trigger action

Post your questions and help other users.

Moderator: Martin

Post Reply
Freakadude
Posts: 25
Joined: 20 Sep 2013 08:59

Create countdown based on dialogue entry to trigger action

Post by Freakadude » 18 Jan 2020 21:26

Hi,

I have following scenario i would like to solve but am stuck:

I have a smart plug in my home which i can control (on/off) via HTTP requests. I want to create a flow where when i execute it via a shortcut from my home screen i get an input dialogue asking me for the amount of time to use for a countdown (i.e.: 5h39m30s, or 600m , etc) then once i have given the time the countdown/timer should start somewhere in the background. Once the set countdown has elapsed it shall trigger the last action in the flow which is a HTTP POST request.

The HTTP Post request works fine however i am stuck in finding out how i could setup the input dialogue and the countdown based on above description.

Any help or guidance would be appreciated.

KR

anuraag
Posts: 309
Joined: 24 Jan 2015 02:06

Re: Create countdown based on dialogue entry to trigger action

Post by anuraag » 19 Jan 2020 00:49

Here is an example flow if you your required time is less than 24hr.
http://automagic4android.com/flow.php?i ... fdd7fed089

Here is another example if you want to put it manually like 5h30m10s
http://automagic4android.com/flow.php?i ... e84ab351a8

Replace http request action with yours. I have chosen Time in input Dialog.

Method 1 (preferred) require Global Variable Date/Time trigger. In Global Variable Date/Time enable options which you require.

Freakadude
Posts: 25
Joined: 20 Sep 2013 08:59

Re: Create countdown based on dialogue entry to trigger action

Post by Freakadude » 19 Jan 2020 10:34

Thank you! Both methods work flawlessly but i will use per your suggestion method 1! :D

Post Reply