Using zone triggers with "for"

Zones can overlap. But device tracker & person entities can only have one state, which is home if they’re in zone.home, not_home if they’re not in any zone, or the friendly name of the zone they’re in (for zones other than zone.home.) Hence they can’t indicate more than one zone at a time, even if they are in more than one zone at a time.

Basically, when you’re in more than one zone at the same time, the zone it chooses is the one whose center you are closest to. If there are more than one you’re closest to (i.e., they have the same center), then it chooses the smallest of those. So, if zone.home and zone.mycity have the same coordinates but different radii, and you’re in both, then it will choose the smaller of the two (which you said is zone.home.)

zone.home can be defined explicitly in your configuration, or it will be created automatically using HA’s location configuration. See Home Zone.

So given that these two zones overlap I think you’ll need to change the value_template in my suggestion to:

          {{ expand('group.family')
             |selectattr('state','in',('My City Friendly Name','home'))|list|length > 0 }}
2 Likes