One of the most powerful abilities of Home Assistant is the ability to easily create automation based on the current location of our home users.

For instance, start the vacuum cleaner and 9:00 am, only if you’re not home.

This of course can be done with the built-in automation editor, but the condition for the scenario can be rather long, particularly if there is more than one person in the house.

Sensor of how many adults are home

How many adults are home

One of the ways to simplify the Automation is using only one sensor in the condition section, in this case, a sensor that will tell us how many people (or adults) are in the house.

Based on that information, we can easily initiate or postpone automation.

For this to work, you’ll need to have all the persons in the house use one of the presence detection (preferably the home assistant companion app) and define your home location.

Add to your configuration.yaml file this under the sensor section:


A sensor that counts home many adults are in the house.


Add the if  part for every person in the house and that’s it 🙂



Leave a comment