# One button to activate different flow

**URL:** <https://community.homey.app/t/one-button-to-activate-different-flow/48727>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [June 23, 2021, 3:44pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727 "2021-06-23T15:44:44Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 23, 2021, 3:44pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/1 "2021-06-23T15:44:44Z")

</div>

Hi,

I have a SmartButton from Phillips hue. Each time I press it, it increase a variable X (with better logic).

I have several flows wich start when X is equal to a certain number. With that way I can activate an unlimited number of scene.

But…

If I want to activate the 3rd flow, it will first active the 1 then 2 then 3.

I want to press X time on the button and activate only the Xth flow.  
How can I do that ?

Is there a way to wait 2s before checking the value ?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [June 23, 2021, 4:26pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/2 "2021-06-23T16:26:36Z")

</div>

Use a timer.

At the first push of the button you start the timer, when the timer is emty u start a flow and check the velue of the variable

---

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 23, 2021, 4:43pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/3 "2021-06-23T16:43:26Z")

</div>

I’m not sur to understand.

Flow 1 : button pressed, then start a timer  
Flow 2 : When the timer is over Then “check the variable” ? How do check the value to start a specific flow ?

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [June 23, 2021, 5:53pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/4 "2021-06-23T17:53:57Z")

</div>

My english is not very good but i try to explane.

FLOW1:

IF  
Button is pressed  
THEN  
Start a timer of X seconds  
Presses counter +1

So, when u pressed the button the timer wil start and de couter increse with +1. If u press the button within two seconds the timer start again and te counter increase again with +1

Then FLOW 2 (one push)

IF  
Timer is emty  
AND  
Value of counter is 1

THEN  
Do the one push thing

FLOW 3 (2 pushes)  
IF  
Timer is emty

AND  
value is 2  
THEN  
do the 2 pushes ting u want…

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [June 23, 2021, 6:44pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/5 "2021-06-23T18:44:13Z")

</div>

Small improvement: the explained flow will trigger the timer every time its pressed.  
Tip: split the counter and the timer in 2 flows. Disable the flowmtriggering the timer after the 1st press and enable it when the counter is finished.

Small improvement2: dont know how many flows you have. But if you have ten, you always need to wait ~10 seconds for the flow to run  
Tip: keep the timer at a low number and reset it every time the button is pushed

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [June 23, 2021, 6:52pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/6 "2021-06-23T18:52:55Z")

</div>

Small improvement 3:  
Get [another button](https://www.robbshop.nl/scene-master?gclid=EAIaIQobChMImfu9nLau8QIV2prVCh1AUQb2EAQYASABEgLy0_D_BwE)!  
Now who wants to wait 10 seconds (minimum, if it works at all) to start a flow?

---

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 23, 2021, 7:18pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/7 "2021-06-23T19:18:25Z")

</div>

Awesome, thank you a lot for all your advice. I only have 3 flow for now so I will not wait 10s ^^

Thanks !

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [June 23, 2021, 7:45pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/8 "2021-06-23T19:45:15Z")

</div>

You only have to wait 2 seconds after the last push…

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [June 23, 2021, 8:03pm UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/9 "2021-06-23T20:03:55Z")

</div>

And if u have 10 flows, like @FKey mentioned, and add the time u have to push the button u will count 12 seconds! How fast is the button anyway @Noctoyo ? Can u push 3 times within a second to increase the variable with 3?

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [June 24, 2021, 6:27am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/10 "2021-06-24T06:27:31Z")

</div>

At first I couldn’t believe it either and had been working on another solution, but @Jan_Willem_Visser is right. His flow works flawless and you only have to wait 2 seconds (with a timer of 2 seconds) after the last push.  
However, it must be mentioned that the card for the timer must be a “start or replace” card. This card is available in the Chronograph app. Whether other timer apps have these options as well, I don’t know.

 ![Bildschirmfoto 2021-06-24 um 08.27.01](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/b/0b4798fe764ac6c4661934c569df208496710cb5.png)

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [June 24, 2021, 6:29am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/11 "2021-06-24T06:29:56Z")

</div>

Every time u push the button the timer start again with only 2 seconds… When the timer is emty al the flows triggert at the same time but only the flow where the AND part is true whil be executed.

I heave no idea how fast te button wil be… And heave also no idea if homey kan handel u push every second or so…

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [June 24, 2021, 7:04am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/12 "2021-06-24T07:04:16Z")

</div>

It’s possible with 1 sec timer.

These are the flows:

 ![Bildschirmfoto 2021-06-24 um 08.56.09](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/3/53618119e5855082aa9c83943a18b2a8fee666db.png)

 ![Bildschirmfoto 2021-06-24 um 08.56.26](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/4/548a5d0fdbcd007cd1182dfdc2f7f815500e5581.png)

In the 2. Flow the summary of the pushes will be set into another variable, just to show that it works.

![Push](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/f/4f62cacf2b67c0eb445f6c4f49d625ba1eb5f494.gif)

First I reset the variables with a third flow. Then I pushed the button (Philips Smart Button) 7 times. Every time within 1 sec. After the 7. push I don’t pushed anymore.  
When the timer **Push2** is expired, the value of the variable **TV\_Count** will set into the variable **TV\_Execute**.

That’s it. Very simple but effective, thx @Jan_Willem_Visser. 👍🏼

---

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 24, 2021, 8:20am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/13 "2021-06-24T08:20:11Z")

</div>

I noticed that the button is not super fast. I don’t know how it really works. I created flows as you say but sometimes it works, sometimes I think I press the button too fast. It is not very stable.

I will try with chronograph.

---

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 24, 2021, 8:44am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/14 "2021-06-24T08:44:38Z")

</div>

Thank you, it really helps.

But now I realised that the smartbutton from philips hue kinda suc\*\*. I have to wait 1s (or more sometime) before it increases the variable.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [June 24, 2021, 9:11am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/15 "2021-06-24T09:11:04Z")

</div>

As you can see in the video it works flawless with the Philips Hue SmartButton.

How is your SB paired with Homey? With the Hue Bridge or directly with the Philips Hue, without the bridge app? Mine SB is paired without the Hue bridge.  
With the Hue bridge I guess there will be definitely a delay.

BTW, the solution of your question is from @Jan_Willem_Visser not from me… 😉

---

<div class="post-metadata">

**Author:** ![Noctoyo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/noctoyo/32/34032_2.png) [@Noctoyo](https://community.homey.app/u/Noctoyo)\
**Post date:** [June 24, 2021, 9:25am UTC](https://community.homey.app/t/one-button-to-activate-different-flow/48727/16 "2021-06-24T09:25:40Z")

</div>

Yes, My smartbutton is paired with the Hue Bridge.  
I’ll try without it.
