Action: Pause - no reset

Post your questions and help other users.

Moderator: Martin

Post Reply
Moebius
Posts: 6
Joined: 06 Jan 2014 06:24

Action: Pause - no reset

Post by Moebius » 08 Jan 2014 21:14

Hi,
i have a simple flow with the trigger "display off" followed by a pause action and then I wanI to set the device to flight mode.

Now I noticed that the pause timer keeps running if the trigger fires again. From my understanding the pause should restart from the beginning.

Is there a way to achieve that now, or is it a feature request? (checkbox reset if called again)

Thanks

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Action: Pause - no reset

Post by MURTUMA » 08 Jan 2014 23:06

There's no such action as "pause". Do you mean sleep action?

The sleep action stops the flow for the predefined time and then proceeds to the next action/condition. If there's a direct connection to sleep action(ANY action really) from the trigger, of course it executes after trigger.

If I completely misunderstood your problem, please post your flow here so we can take a look.

Moebius
Posts: 6
Joined: 06 Jan 2014 06:24

Re: Action: Pause - no reset

Post by Moebius » 09 Jan 2014 00:09

yes, in the German version pause is sleep.

The problem: if the trigger fires again, before the sleep time is up, the timer is not reset.Instead a new timer is created.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Action: Pause - no reset

Post by MURTUMA » 09 Jan 2014 04:46

Please, share your flow and explain what you're trying to achieve? From your explanation in the first post I can't imagine why would you need a sleep action there. I'll take a look if I can solve this by changing your flow.

Moebius
Posts: 6
Joined: 06 Jan 2014 06:24

Re: Action: Pause - no reset

Post by Moebius » 09 Jan 2014 10:33

This is the flow:
http://automagic4android.com/flow.php?i ... 5dda049d03

Goal: enter flightmode after 15 minutes display off

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Action: Pause - no reset

Post by MURTUMA » 09 Jan 2014 16:37

http://automagic4android.com/flow.php?i ... 7351b053fb

Here's two flows that solves your problem. The first flow sets the timer to 15 minutes and enables the second flow which in turn executes when the timer expires and then disables itself.

I assume you have a flow to disable the airplane mode when you turn the screen on? You should put there an action to disable the second flow, so it doesn't turn airplane mode on when you're using your phone.

Using sleep action for such long times as 15 min is not recommended.

Moebius
Posts: 6
Joined: 06 Jan 2014 06:24

Re: Action: Pause - no reset

Post by Moebius » 09 Jan 2014 18:17

Thanks Murtuma for your sample,
but i hoped that this could be done with only one flow.

Also i would assume, that the sleep command internally uses the same timer function as "timer".
Where is the difference?
Why is sleep not recommended? (In the sample it even sleeps 2h15m and offers "d" for days to sleep!)

Post Reply