# How to check everybody is at home?

**URL:** <https://community.homey.app/t/how-to-check-everybody-is-at-home/66569>\
**Category:** Questions & Help\
**Tags:** homey-pro, advancedflow\
**Created:** [July 27, 2022, 10:33am UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569 "2022-07-27T10:33:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_89](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thomas_89/32/58171_2.png) [@Thomas\_89](https://community.homey.app/u/Thomas_89)\
**Post date:** [July 27, 2022, 10:33am UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/1 "2022-07-27T10:33:24Z")

</div>

Hi,

I am trying to create an advanced flow which only performs the action when the last person comes home. This is because only at this moment I want to activate the security flows.

I can find the following options:  
IF

- 
  - First person comes home

- 
  - Last person leaves

- 
  - Some comes home

- 
  - Specific person comes home

AND

- 
  - Specific person is at home

- 
  - Nobody is home (which becomes some is at home when you turn it around instead of everybody is at home what I expected)

So these do not enable what I want.  
IF some comes home  
AND everybody is at home

Or

IF the last person comes home

Any suggestions what I am missing?

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [July 27, 2022, 10:47am UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/2 "2022-07-27T10:47:55Z")

</div>

The flow should be something like this:

When:

- someone comes home

And:

- add a separate check for everyone in your household to the and part.

Then:

- …

Or create a specific Homey script (to start as condition) to test all Family members in one condition.

---

<div class="post-metadata">

**Author:** ![Sjoerd1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sjoerd1/32/33892_2.png) [@Sjoerd1](https://community.homey.app/u/Sjoerd1)\
**Post date:** [July 27, 2022, 3:42pm UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/3 "2022-07-27T15:42:46Z")

</div>

You can make a flow with the start:

IF the last person comes home….

Same for leave.

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [July 27, 2022, 3:52pm UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/4 "2022-07-27T15:52:28Z")

</div>

That card does not exist:

 ![SmartSelect_20220727-175121_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/4/84d7f2b7335a2876aaf5f650a57b18cd4f6e43ec.jpeg)  
Where did you find it?  
Only “the last person leaves” exists…

---

<div class="post-metadata">

**Author:** ![Sjoerd1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sjoerd1/32/33892_2.png) [@Sjoerd1](https://community.homey.app/u/Sjoerd1)\
**Post date:** [July 27, 2022, 5:35pm UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/5 "2022-07-27T17:35:33Z")

</div>

Sorry first person comes home I mean. Read it to quickly 😅. Ignore my post 😁

But you could make a number variable. Every time someone comes home +1. And if someone leaves home -1. And id you for example have 4 people in a household do something when the variable is 4.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [July 27, 2022, 7:59pm UTC](https://community.homey.app/t/how-to-check-everybody-is-at-home/66569/6 "2022-07-27T19:59:59Z")

</div>

Something like this in AF

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/d/4d62029f38fcb74732d2feba16d3a8bf93530246.png)

```auto
// Test everyone Home 
var users = await Homey.users.getUsers();
for (const user of Object.values( users ) ) {
  // log( "User", user.name ) 
  if (user.enabled & ! user.present ) {return false}
};
return true;

```
