# Best method? Using AND-criteria VS disabling flows

**URL:** <https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [March 8, 2022, 6:40am UTC](https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459 "2022-03-08T06:40:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dzt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dzt/32/50239_2.png) [@dzt](https://community.homey.app/u/dzt)\
**Post date:** [March 8, 2022, 6:40am UTC](https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459/1 "2022-03-08T06:40:49Z")

</div>

Hello

Is disabling the flows a way to go when you don’t want a flow to run, or should you stick to using the criteria in AND to decide whether the flow should continue?

I am trying to decide upon a method to use in my flows where the trigger is often being activated.

* * *

**Illustrative example**

_Alt. 1_  
1 Motion sensor active → AND the lock is locked → THEN Unlock

_Alt 2._  
1-1. Motion sensor active → AND … → THEN Unlock + Disable the flow

1-2. The lock is locked → THEN Enable the flow 1-1

* * *

Is something to be gained from using alt. 2? Especially if the particular trigger is often activated, or even used as a trigger in many other flows (i.e. motion or door sensors).  
Does it make other (enabled) flows run faster?  
For me it looks like you could

- spare Homey for some computing time if unnecessary flows are OFF?
- have a fewer flows in total (in some cases).

But does it make a difference, though?

Thanks.

DzT

---

<div class="post-metadata">

**Author:** ![Matrean](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/matrean/32/122480_2.png) [@Matrean](https://community.homey.app/u/Matrean)\
**Post date:** [March 8, 2022, 7:15am UTC](https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459/2 "2022-03-08T07:15:15Z")

</div>

> [@dzt](#):
>
> to be gained from using alt. 2? Especially if

I would choose option 1 it’s much easier to read and manage. Personally, I never use enable or disabling a flow other than for testing/development purposes.

If flows are more complex you can also use setting and validating variables

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [March 8, 2022, 8:00am UTC](https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459/3 "2022-03-08T08:00:09Z")

</div>

Option 2 will save a bit of processing time but is harder to maintain in the future when you have forgotten what can disable and enable flows.  
So it’s just down to personal preferences.

---

<div class="post-metadata">

**Author:** ![dzt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dzt/32/50239_2.png) [@dzt](https://community.homey.app/u/dzt)\
**Post date:** [March 9, 2022, 12:25am UTC](https://community.homey.app/t/best-method-using-and-criteria-vs-disabling-flows/61459/4 "2022-03-09T00:25:23Z")

</div>

So, good to know that there is no concrete advice against the use of one or the other. I wanted to check if the latter maybe was considered a no-no in the programing circles. 🙂  
I agree with the use of validating variables as @Matrean suggested, but I do disable some flows with triggers that are used to start more than a few flows (mostly sensors or time activated/every X minutes).  
I’m using flow comments app and log to keep track of so called switch flows toggling flows on and off.

Thanks guys!
