How to check everybody is at home?

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?

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.

1 Like

You can make a flow with the start:

IF the last person comes home….

Same for leave.

That card does not exist:


Where did you find it?
Only “the last person leaves” exists…

Sorry first person comes home I mean. Read it to quickly :sweat_smile:. Ignore my post :grin:

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.

Something like this in AF

// 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;
3 Likes