Take action when home becomes empty, occupied

Hello :wave:t2:

Sharing two very simple blueprints that I think could be useful for beginners

Take actions when the home becomes empty (When the last person leaves home):
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The blueprint asks you to select the zone that corresponds to your home.
You can pick the action you want to perform once the home becomes empty.
By default, an action is present and turns off all lights in the home, you are free to use it or remove it.

Take actions when the home becomes occupied (When the first person arrives home):
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The blueprint asks you to select the zone that corresponds to your home.
You can pick the action you want to perform once the home becomes occupied.
There is no default action in this case.

I hope it will help beginners :wink:

Source code

JLo

I’m looking for almost exactly that, would you know how to enhance this blueprint with a duration?
I have already built myself a similar automation manually but my issue is that my position keeps jumping out of home and back in a few minutes later because of some unknown reason… Same happens on the phone of my wife. When we’re both home it never happens at the same time so no issue but when only one is home such an automation sucks because it’s triggered immediately when our position is buggy…
If I could ensure the home is empty “for at least 10-15 minutes” it would be helpful in avoiding such false triggers.
In parallel I’m looking for other means to avoid the false triggers, my WiFi access point having an integration I could probably have it check that out phones are not connected to the home wifi before acting on “the home becoming empty”

Thanks in advance for any help