# H.O.O.P. (Hope) - Examples

**URL:** <https://community.homey.app/t/h-o-o-p-hope-examples/45114>\
**Category:** Tutorials\
**Tags:** app, tools, tutorial, flow\
**Created:** [March 23, 2021, 6:05am UTC](https://community.homey.app/t/h-o-o-p-hope-examples/45114 "2021-03-23T06:05:48Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 27, 2021, 10:30am UTC](https://community.homey.app/t/h-o-o-p-hope-examples/45114/9 "2021-03-27T10:30:59Z")

</div>

### Example Using one button for multiple purposes (multiple fired)

This flow can be triggered from a single source (like a button or flow-trigger) but will handle it as if the button can be clicked multiple times.  
Because HOOP doesn’t have a debounce-functionality yet, i have created a Countdowntimer called **PushButtonPushesResets**.  
I have also created (in the flow) a number variable called **PushButtonPushesCount**.  
Where ever you see the questionmark, it’s the **PushButtonPushesCount** variable.

(After you create a flow-variable in flow, they flow needs to be triggered once for the variable to become visible (and to select it)).

[Main Method Flow | Homey](https://homey.app/nl-nl/flow/MkWbPx/)

- Conditioncardmode is set to If-Or-Finally
- First stop the Countdown
- Then increase the PushButtonPushesCount with one
- Then comes the IF PushButtonPushesCount equals 1 THEN
  - Then comes the INNER IF Light is Off THen
  - Turn light On
  - Else Turn light Off
  - End If

- ElseIf PushButtonPushesCount equals 2 THEN dim light to 50%
- ElseIf PushButtonPushesCount equals 3 THEN dim light to 100%
- END IF  
And finally, in the 3th And group (watch carefull where you place it!), start the (restart) countdown with an amount of seconds (here 3 is used) which will set **PushButtonPushesCount** to 0 (zero).

[Main Method Flow (reduced flow) | Homey](https://homey.app/nl-nl/flow/A2IfPx/)

The INNER IF is replaced with a Toggle Light card.

[Countdown stops Flow | Homey](https://homey.app/nl-nl/flow/5f9cPx/)

[Test trigger Flow | Homey](https://homey.app/nl-nl/flow/gn3cPx/)

---

_[View the full topic](https://community.homey.app/t/h-o-o-p-hope-examples/45114)._
