If not home trigger with zones

Hi,

I hope you are fine.

I recently changed to zone tracking.
Now the group.family I created does not show anymore “home” or “not_home” if someone is in a zone.
Thats as expected.

Now I just want to write an automation that does have the condition if group.family is NOT home, so I t could be anything else, I just want to make sure that no one is home.

How would I create this?
I am not able to find any solution.

What is the state? I have a group that tracks a few device trackers and my wife and I are currently in our ‘work’ zones and the group state is “not_home” the front end shows away.

To test for not home see an example from one of my automations below.

https://github.com/SilvrrGIT/HomeAssistant/blob/master/automation/leaving_home.yaml#L16

IT always showed “unknown” but I turned it off as I used iCloud but it drained the battery to much.

My fritzbox presence detection des not work anymore, so I am looking fo ra new way to do a presence detection as best as possible, will try nmap, need to see how this drains the battery