Zone and automations

Good morning! I have a question about how an automation works.
I have 3 zones in my city and they are concentric. A, B and C as in the photo.

Automation: if I leave zone B, turn off switch X.
I wanted to know: if I move from Zone B to Zone A (a zone inside zone B), will switch X be turned off or will the user still be considered in Zone B. Does a zone inside another zone exclude the external zone?

For location debugging I suggest an Android phone with mock locations app.
It makes it so easy to test automation based on location

No. It will be unpredictable. Avoid zones within zones, never make a zone for home yourself (this is done by HA) and use the proximity integration if you want to know how near you are to a zone. Most likely you’d want to use small zones and proximity ranges/travel directions.

2 Likes

Impossible to use proximity:

A: is my Home
B: is my City
C: is Outside my City

My thermostat automation should go OFF when we are Outside my city and back ON when we are back.

When I’m in the city or at home, the thermostat must work… because the house must stay warm.
(Likewise, I can’t use location only for the city… because I have other home automations).

Unfortunately we can not shape the areas…

they should be able to shape the outer diameter but also an inner circle diameter.

At the moment the automations based on the two concentric areas work without problems.

I was just curious about how the areas work… I only set the automation based on the transition from B to C and back.

Concentric zones do work deterministically. I have a home and home_close zones.

The algorithm will find the zones you are within and if it’s more than one select the zone with the smallest radius. Should work fine with any number of concentric zones.

Code is here,

1 Like