React to zone from 1 direction only

I’ve created a zone around my development entrance/exit gate, but I only want my Automation to react to it from the entrance side, not the exit. Suggestions?

I thought about creating a larger zone and turning the Automation on/off, but that seems like a lot of steps.

Perhaps there’s a way for HA to know the direction I’m driving and react to it?

I think I am reading that entrance and exit are two different zones. Is that true?

I think I am reading that based on possibly doing a ‘larger’ zone.

I think what you want is doable using the two zones easier than a larger zone.

Can you explain the traffic better? I’d like to attempt to help with this one as I have written several tough zone automations. It seems challenging. But, I need more info.

Use the Proximity integration to get the direction of travel.

1 Like

Only 1 zone, ie. 1 gate. Now that I think of it, I suppose I could have separate zones, one on either side of the gate?

I’ll look into this… Thanks.

I’m not understanding ‘direction of travel’.

I found the below example, but I want this condition only for when traveling in the North direction. Is that possible?

{{ trigger.to_state.attributes.dir_of_travel  == "towards" }}

It is not compass direction. It is in relation to a zone.

So, if you are getting closer to a zone, it would be towards. If getting farther away from a zone, it would be away_from.

Got it, thanks. I’m thinking then, I should create separate zones either side of the gate.

1 Like

So, I just reread this. Does this mean you want the automation to react when you are going IN to your gate from the outside?

If so, you can use one zone and set it to be a size that includes an area outside and when you enter the zone, react.

Yep, that’s the correct scenario.

Since I already have home and gate zones, I think I will try this first… Once in Gate Zone, I will turn off that automation. Then, using Proximity, I’ll turn that zone automation back on when I’m 500 meters out of my Home Zone.

Might be worth checking out.
:shinto_shrine: Automatic Gate : don’t ever use your remote again - Blueprints Exchange - Home Assistant Community (home-assistant.io)

1 Like