# Handling Else-If scenarios in flows

**URL:** <https://community.homey.app/t/handling-else-if-scenarios-in-flows/8870>\
**Category:** Questions & Help\
**Created:** [February 7, 2019, 4:12pm UTC](https://community.homey.app/t/handling-else-if-scenarios-in-flows/8870 "2019-02-07T16:12:53Z")\
**Posts on this page:** 1\
**Showing post:** 13

<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:** [August 8, 2021, 9:11pm UTC](https://community.homey.app/t/handling-else-if-scenarios-in-flows/8870/13 "2021-08-08T21:11:19Z")

</div>

Hi Pascal. I just stumbled on your post, I just wanted to respond.

> [@Pascal\_Nohl](#):
>
> When window 1 closes and window 2 still open do nothing. When window 1 closes and window 2 closed set valve to heating. With the actual system, in the AND I have just the option “Window 2 is open” (no window 2 is closed)

Maybe I misunderstand, but this is pretty straightforward to build.

**IF** a contact alarm changed to state off  
**AND** window1 contact is off  
**AND** window2 contact is off  
**THEN** switch heater ON  
**ELSE** switch heater OFF

And, if window1 is opened, and window2 is closed or open or the other way round;  
**IF** a contact alarm changed to state on  
**AND** window1 contact is on  
**OR** window2 contact is on  
**OR** window1 contact is on  
**AND** window2 contact is on  
**THEN** switch heater OFF

> [@Pascal\_Nohl](#):
>
> presentation that shows flows as groups and indended if they are called in a flow

+1 and I would like to add: some overview of which var is used in which flow(s).

I also want you and @lucje point to a neat flow editor app, which let you build flows way more flexible [H.O.O.P. (Hope) - Homey Object Oriented Programming](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709)

---

_[View the full topic](https://community.homey.app/t/handling-else-if-scenarios-in-flows/8870)._
