# Flow logic determining first person in and last person out

**URL:** <https://community.homey.app/t/flow-logic-determining-first-person-in-and-last-person-out/10684>\
**Category:** Questions & Help\
**Created:** [March 16, 2019, 7:19pm UTC](https://community.homey.app/t/flow-logic-determining-first-person-in-and-last-person-out/10684 "2019-03-16T19:19:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Horizon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mr_horizon/32/8322_2.png) [@Mr\_Horizon](https://community.homey.app/u/Mr_Horizon)\
**Post date:** [March 16, 2019, 7:19pm UTC](https://community.homey.app/t/flow-logic-determining-first-person-in-and-last-person-out/10684/1 "2019-03-16T19:19:38Z")

</div>

Hi,  
Having the netgear app up&running, I am looking for inspiration to setup flows linked to firstPersonComesHome and lastPersonLeavesHome.  
Any suggestions are welcome!

---

<div class="post-metadata">

**Author:** ![Mr\_Horizon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mr_horizon/32/8322_2.png) [@Mr\_Horizon](https://community.homey.app/u/Mr_Horizon)\
**Post date:** [March 16, 2019, 8:33pm UTC](https://community.homey.app/t/flow-logic-determining-first-person-in-and-last-person-out/10684/2 "2019-03-16T20:33:01Z")

</div>

My current setup of 2 flows is: someone leaves and no one is home then set variable allAbsend true and turn off lights.

 ![59](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/03d48b5fa1c1aa84174ab48ae5b30c879d62c096.png)  
When first one comes in: someone comes home and variable allAbsend is true, then allAbsend is set to false and flow Welcome home is triggered.  
 ![28](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/c/c00dd244605aaf56284e3d5cbb2592c0e6a677f2.png)  
Any advice for improvements?

---

<div class="post-metadata">

**Author:** ![bvdbos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bvdbos/32/2352_2.png) [@bvdbos](https://community.homey.app/u/bvdbos)\
**Post date:** [March 17, 2019, 8:31am UTC](https://community.homey.app/t/flow-logic-determining-first-person-in-and-last-person-out/10684/3 "2019-03-17T08:31:16Z")

</div>

![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/9/905d9551ec8f469661907ede3c48e90b574e4453.png)
