Notify the persons who are currently at home

I would like to know what the best working way is to only notify those persons who are currently at home. This is to prevent that persons who are not at home will receive notifications about things that happen at home (for example, the fact that the laundry is ready). I already use zones and unifi device trackers. I have already searched on the internet and have found information about notify groups, but I can’t get this to work. It would be nice if I could re-use this functionality in multiple automations without having to adjust the code. Thanks in advance for thinking along!

What are your criteria for “best”?

There’s a script Blueprint to help you create a script that you can call from automations. If you plan to use multiple notifier integrations, you may still need to use Notify Groups to get the desired effects.

If you are having issues with Notify Groups, you should describe what you tried and what happened.