#178665·core

Add zone containment detection as a labs feature

Author: nielsrowinbikCreated Aug 10, 2026Updated Sep 17, 2026
Labelsno-stale

⚠️ This issue is blocked by an architecture propose that is yet to be created, but will be linked here.

Zone presence resolves by overlap today: a device counts as inside a zone when the circle defined by its coordinates and accuracy radius intersects the zone circle. A device 200 m from a zone with 300 m of reported accuracy is inside it under overlap. This task adds containment as a second strategy behind a labs toggle. Under containment, a device is inside only when its accuracy circle fits entirely within the zone.

Source: https://www.figma.com/board/lAIMuQd21TgPtVv6Pe2IVK/Zone-containment?node-id=0-1&p=f&t=HCb3J5WuQJN7NlYe-0

What is changing

Zone containment logic will work like this with the feature flag enabled:

  • A device is considered inside the zone when the accuracy circle sits entirely within the zone circle; it is considered outside when the two do not intersect at all.
  • It is resolved from the current location report alone, with no stickiness, hysteresis, or debouncing.
  • A missing or zero accuracy value is treated as a point: the device is inside when its coordinates fall within the zone.
  • Zone triggers, zone conditions, the zone entity's person count, and person entity state must all use this logic.

Each device's zone state is re-resolved from its last known location report when the toggle is switched, so states do not go stale until the next report. As with any labs feature, it will be off by default.

Labs toggle copy

Name:

Improved zone presence detection

Description:

Home Assistant decides whether a device is in a zone by comparing the zone circle to the accuracy circle reported by your device. This feature changes the rule used for that comparison.

  • Overlap (current behaviour): Enters a zone when the device accuracy circle overlaps with the zone.
  • Containment (labs): Enters a zone only when the device accuracy circle is fully inside the zone.

Containment is more accurate, but it needs your zones to be large enough. While a device reports an accuracy circle larger than the zone, that device never enters the zone, and anything triggered by it does not run. Check your zones before turning this on: a zone with a radius under TODO: threshold will rarely be entered.

Note: a warning will be added to the zone editor, to keep the user from making a new or existing zone too small in https://github.com/home-assistant/frontend/issues/54238.