Preventing flows getting executed by short disconnections

Post your questions and help other users.

Moderator: Martin

Post Reply
Lange_666
Posts: 17
Joined: 19 Nov 2016 12:14

Preventing flows getting executed by short disconnections

Post by Lange_666 » 20 Nov 2016 22:34

I'm rebuilding all my Tasker profiles into Automagic. So far so good except for one litle glitch which also exists in Tasker.

Im rebuilding a flow (or chain of flows) to switch from Mobile Data to Wifi when it detects i'm at home based on Cell Tower connection.
This works quite good for most of the time but when the connection is dropped for a short time, it will change from Wifi to Mobile data for the time the connection is dropped.
The moment it reconnects it switches back from Mobile Data to Wifi.
This happens because once the flow is triggered, there is no way back and it's excuted all the way.

Q: Is there a way around this behaviour?

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Preventing flows getting executed by short disconnection

Post by kintrupf » 21 Nov 2016 08:47

You could add a Sleep action right after the trigger and let the flow sleep for a few seconds. After that you can re-check if the trigger condition is still valid and only proceed if it is.

For example:

trigger: WiFi disconnected
action: Sleep(5s); sleep 5 seconds
condition: WiFi connected; false: still disconnected, continue with original flow; true: WiFi has reconnected, do nothing (don't connect true branch to anything)

Lange_666
Posts: 17
Joined: 19 Nov 2016 12:14

Re: Preventing flows getting executed by short disconnection

Post by Lange_666 » 21 Nov 2016 19:50

Thx, i'll give that a shot

Post Reply