Page 1 of 1

AND multiple triggers

Posted: 10 Nov 2019 00:21
by maw
I think I need an AND trigger unless someone can suggest a way to accomplish this.

When I'm connected to my office wifi during work hours I want to mute the phone. If I set a wifi-connected trigger and add a time condition it won't work if I arrive early. Any suggestions how to accomplish that?

Re: AND multiple triggers

Posted: 10 Nov 2019 18:05
by Desmanto
Tirggers always work as OR logic. The only way you can use AND is to add condition to it. Or you can cascade the trigger by putting the other AND trigger in other flow and enabled it after the first flow is triggered.

For your case, it can be simple. Use 2 flows. Use the 2nd flow as the buffer to make sure the mute is executed if you arrived early.
Flow 1
Trigger : Wifi Connected
Condition : Time Range : your office hour
[True] Action : Mute the phone (or whatever your set of actions)
[False] Action : Set Flow State : Flow 2 > enabled

Flow 2
Trigger : Time : your office hour starting time
Action : Mute the phone
Action : Set Flow State : Flow 2 > disabled.

Testing the flow in 2 scenarios :
1. Arrive early : Flow 1 triggered, not office hour, enable flow 2. After office hour reached, flow 2 mute the phone and disabled itself (one time use)
2. Arrive within office hour (or late) : Flow 1 triggered and immediately mute the phone. Flow 2 never used.