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 ?
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
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
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?
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.
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…
In the 2. Flow the summary of the pushes will be set into another variable, just to show that it works.
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.
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.
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…