# Help with flow to ignore if a switch is pressed

**URL:** <https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896>\
**Category:** Questions & Help\
**Created:** [February 17, 2025, 9:31pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896 "2025-02-17T21:31:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 17, 2025, 9:31pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/1 "2025-02-17T21:31:53Z")

</div>

Eveing all,

I have these 2 flows setup in the kitchen.

The first is this which turns on all the under cupboard/cabinet lights when someone walks into the kitchen at night. Which works spot on.

 ![Screenshot 2025-02-17 at 21.28.23](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/e/fee0e19a5ba4cd10e141c5c790cb326198e2bb11.png)

I then have this flow which turns the lights off after 2 mins if no motion is detected.

 ![Screenshot 2025-02-17 at 21.26.43](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/9/b903ca1c4e81cea3f700f99215439444dd07f81d.png)

My question is I want the turn off to be ignored if the hue switch has been pressed to turn them on. Currently if I turn them on with the hue physical switch, after 2 mins they turn off if I am say sat at the table working. So I want the flow to be ignored if the switch is pressed, but I can’t work out how to do it.

Thanks for the help in advance.

Carl

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 17, 2025, 9:46pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/2 "2025-02-17T21:46:42Z")

</div>

Hi Carl,

> [@Slimmem plafonniere en hotel schakeling](https://community.homey.app/t/slimmem-plafonniere-en-hotel-schakeling/130762/6):
>
> A while ago, I made this flow for this usecase

 ![17397385462014946870163701412951](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/b/cbefc564c8f4c0a2debba0ba1e66e36d06a5a057.png)

You can import it if you like:

> [@The Flow Exchange(r) - Exchange Your Flows with Others!](https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981/84):
>
> Zone activated Device with Manual Device OnOff option When you have, say, a garage with (a) motion sensor(s), and (a) (garage)door sensor(s), the light should turn on for 3 minutes after a motion event, or an opened garagedoor; While there’s movement, lights stay on; When the button gets pushed, lights should turn on, and stay on until the button is pushed again. Apps used: [Chronograph](https://homey.app/a/nl.fellownet.chronograph) TEF: [tef:FLOWS:"H4sIAAAAAAACA8VX224jx…

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 17, 2025, 9:49pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/3 "2025-02-17T21:49:41Z")

</div>

This is how my switch is setup, will your example still work and how do you get the any option?

 ![Screenshot 2025-02-17 at 21.48.41](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/0/1036681f3003d46a1c2d71d06f1a82c3c88017cc.png)

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [February 17, 2025, 9:58pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/4 "2025-02-17T21:58:48Z")

</div>

ANY function .

 ![1000000258](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/b/cb741f4f45427653286009477866be77dee82b1a.jpeg)

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 17, 2025, 9:58pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/5 "2025-02-17T21:58:55Z")

</div>

I don’t get the hue dimmer switch showing up in the ‘and’ logic setting. So can’t use that option

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 17, 2025, 10:01pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/6 "2025-02-17T22:01:20Z")

</div>

Yes, use logic cards and search for the dimmer tags.

[![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/4/441f03af3920e71d7e4c61ca60dcdde612a747a8.jpeg "Homey: how to pick a tag from a certain device") ](https://www.youtube.com/watch?v=X-9zO9khx_E)

> **[Using Homey Logic in Flows](https://support.homey.app/hc/en-us/articles/4410240765586-Using-Homey-Logic-in-Flows)**
>
> You’ve probably seen Homey Logic. Once you get the hang of it, it's a great tool for any smart home. By creating your own Variables and using these in your Flows as Tags, you can often accomplish c...

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 17, 2025, 10:09pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/7 "2025-02-17T22:09:23Z")

</div>

Nothing shows up

 ![Screenshot 2025-02-17 at 22.09.03](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/870e80e9a020564503c27ae17efe9d48c3c00d7c.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 17, 2025, 11:09pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/8 "2025-02-17T23:09:11Z")

</div>

First you should add that “And yes/no is equal to yes” card to the flow;  
next, click into the [Yes/No] field,  
now the dimmer should show up from the selection list, Carl.

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 17, 2025, 11:21pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/9 "2025-02-17T23:21:55Z")

</div>

![Screenshot 2025-02-17 at 23.21.15](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/e/5eecb371acd9a3a4b10904939d7b0f225651ddbb.png)

This seems to have sorted it. Thank you for your help, very much appreciated.

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [February 18, 2025, 10:10am UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/10 "2025-02-18T10:10:20Z")

</div>

@Carl don’t forget to set it back to the default state “no”, otherwise it won’t work after the first button press (it stays on yes). so at the second logic card, if equal to “no” is “no” (i.e. if the state is “yes”), set it to “no” with a logic card. now the default flow (turn off after 1 minute inactivity) still works.

the reason is that in your flow, there is no way that the state can ever become “no”  
I also think you used the wrong card in the first flow (you should set to yes, iso check if yes)?

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 18, 2025, 5:44pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/11 "2025-02-18T17:44:12Z")

</div>

It seems to work as it is at the moment.

If I press any of the three ‘on’ switches on the hue dimmer then it ignores the lack of motion and the lights stay on.

Once they’re switched off with the 4th switch on the Hue dimmer it reverts to normal and reacts to motion, switching off after 1 minute. 🤷🏼‍♂️

The only thing I need to solve is if it’s after sunrise as then it will turn off after 1 min. My house is rural and we have a lot of trees around. So even though it’s sunrise in the winter it’s still fairly dark in the house. But I think I can make that work.

Main point is that it works as I want it to with the flow setup I posted.

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 18, 2025, 10:54pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/12 "2025-02-18T22:54:02Z")

</div>

Can you explain that as I have gotten myself confused now, which isn’t hard! 🤣

I have swapped this around now. Is this how it is supposed to be? Or do I need to add another logic card in? If so, where?

 ![Screenshot 2025-02-18 at 22.52.55](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/0/3087b977679e1aa100544a09ba7c5390c8943c86.png)

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [February 18, 2025, 11:28pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/13 "2025-02-18T23:28:18Z")

</div>

I guess I would do it like this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/9/99575d00cfeabfc118b5d8b836731ea4494d5dae.png)

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 18, 2025, 11:36pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/14 "2025-02-18T23:36:28Z")

</div>

![Screenshot 2025-02-18 at 23.37.49](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/0/e0853ad416cf66f26678a2c262ddbecc3770dbe7.png)

Is that correct now?

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [February 19, 2025, 12:23pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/15 "2025-02-19T12:23:39Z")

</div>

that should do it. is it working correctly for you now?

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 19, 2025, 6:00pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/16 "2025-02-19T18:00:44Z")

</div>

Sometimes it does and sometimes it doesn’t

Eg I’ve been sat at the table just now doing some paperwork and, having pressed the switch, the strip lights just turned off after around 15mins. As soon as I got up and moved from the table they switched back on. 🤔

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [February 20, 2025, 1:12pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/17 "2025-02-20T13:12:07Z")

</div>

in that case what happened i think is the following:

you pressed the botton. that disabled the leds off. you sit at the table. some minutes later you moved, and the zone becomes inactive again, now one minute later the leds are turned off due to motion.

the button press does not indefinitely ignore motion. you would need to add some sort of trigger that the flow can use to turn back to the default flow.

what you could do is add that when the lights are turned off though the button press, that then the flow after inactivity starts again.

so remove the set ignoremotion to yes.  
add a now flow that start with when button off is pressed (on kitchen dimmer), set ignore motion to yes.

---

<div class="post-metadata">

**Author:** ![Carl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carl/32/124386_2.png) [@Carl](https://community.homey.app/u/Carl)\
**Post date:** [February 21, 2025, 5:55pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/18 "2025-02-21T17:55:29Z")

</div>

So like this?

 ![Screenshot 2025-02-21 at 17.54.54](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/f/ff809ec968eea5994e0a2d893653ca655985fbea.png)

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [February 21, 2025, 8:25pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/19 "2025-02-21T20:25:16Z")

</div>

indeed, but don’t forget, the automatic turn off version of this won’t work if you don’t manually turn off the dimmer every time…

but this should work indeed

---

<div class="post-metadata">

**Author:** ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)\
**Post date:** [February 22, 2025, 3:14pm UTC](https://community.homey.app/t/help-with-flow-to-ignore-if-a-switch-is-pressed/130896/20 "2025-02-22T15:14:00Z")

</div>

To me the phrase ‘IgnoreMotionOff is equal to yes’ is confusing.

To me it means that the trigger ‘motion off’/‘zone became inactive’ should be ignored

I would switch both ‘yes’ with ‘no’ and ‘no’ with ‘yes’

I think you want the LED Strips to stay on when the light is turned on manually.

Therefore I would rename the variable to ‘LED Strips kitchen turned on manually‘

WHEN  
the on button is pressed  
THEN  
set ‘ LED Strips kitchen turned on manually‘ to Yes

WHEN  
the zone has been inactive for 1 minutes  
AND  
‘LED Strips kitchen turned on manually’ is No  
THEN  
………

WHEN  
the off button is pressed  
THEN  
set ‘LED Strips kitchen turned on manually’ to No
