Run flow only Once during a timerange..

Post your questions and help other users.

Moderator: Martin

Post Reply
labor
Posts: 1
Joined: 26 May 2017 07:49

Run flow only Once during a timerange..

Post by labor » 27 May 2017 01:19

Hellow guys, I'm kind of new to the automation world and I'm having some trouble setting this flow in automagic.

My flow is intended to activate "Night Mode on Nougat" via autoinput, as my phone is not rooted and I can't use the default settings. So far so good, I created a user input action that allow automagic to toggle Night Mode on and off, my trouble lies in automatizing the process.

I want:
Between 5 pm and 6am, whenever I unlock the phone, automagic runs the input macro once that i successfully created to activate Night Mode.

Things that I tried:

* "Global variable date/time" trigger with [x] trigger immediately on missed events and it worked greatly BUT it do not repeat as you have to set date/time. I need this to happen daily;

* "User present trigger" + time range condition. Problem found: It activates whenever I unlock the phone during the time range and not only once as it was intended;

* "Time" trigger. Problem found: This trigger does not have the [ ] trigger immediately on missed events options so if my phone is not unlocked upon the event time I miss the flow.

I know I'm doing something stupid but it's driving me crazy for the last two days and any help would be really appreciated :)

Serum_114
Posts: 59
Joined: 16 Jul 2014 01:28

Re: Run flow only Once during a timerange..

Post by Serum_114 » 27 May 2017 13:48

Create a global variable switching the value to true if your flow has executed. Create a flow that runs at 6 am resetting it to false. The first step in your flow would be to check the global variable for 'false' before executing.

Serum_114
Posts: 59
Joined: 16 Jul 2014 01:28

Re: Run flow only Once during a timerange..

Post by Serum_114 » 27 May 2017 14:17

A simpler way to accomplish this would be by doing a 'set flow state: disable' during the flow. I prefer the variable option because I have many flows I want to run when my device is unlocked. The variable allows me to trigger just one flow that calls others. If you aren't doing that, disabling the flow is the easiest way to accomplish what you're trying to do.

Post Reply