Location based shortcut based on other people's locations

Here’s a broad, slightly ignorant question so please forgive me. Is there a functions to say “do this automation when I leave this location UNLESS this person in my people’s list is also at that location”
Basically I want to trigger an automation (hue lights) for when I leave home but only if my wife is also not home

Try a home automation in Shortcuts:

Lots of other options too utilising third-party apps and services.