# H.O.O.P. (Hope) - Homey Object Oriented Programming

**URL:** <https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709>\
**Category:** Apps\
**Tags:** app, tools, flow\
**Created:** [March 4, 2021, 6:22pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709 "2021-03-04T18:22:00Z")\
**Posts on this page:** 1\
**Showing post:** 75

<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:** [May 31, 2021, 7:12am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/75 "2021-05-31T07:12:47Z")

</div>

Hey Dennis,

The added trigger cards are not supose to be within the IF-THEN-ELSE part.  
Just place ALL triggercards before any other conditional cards.

What you want is this:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/f/ffdcef62876ca9b76b74eda00f4d5b479303d5b9.png)  
This part will take card of all triggers; it will make sure the flow is triggered by all trigger cards.

After this you can create your IF-THEN-ELSE part.  
But i think what you want is the below example:

I just used a “direct” HOOP trigger (Sensor On) and added a second trigger (Sensor Off).  
Then a simplyfied If-Then statement.

(If you want to trigger this flow to test it, you can use the HOOP Await card, like this:

)

I’ll update the HOOP cards with some more information.

N.b.  
There is no way to make an (added) trigger part of a condition.  
Because to run the trigger-condition, the flow would have to be triggered, before knowing if it should be triggered.  
So, adding a trigger is just like telling the flow simply: if …(Seonsor on) trigger flow and if …(Sensor off) trigger flow and if …(Button pushed) trigger flow.

---

_[View the full topic](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709)._
