Configuration of conditions/triggers for electric gate

Hi All, I hope you can help with this.

I set up HA mainly to help with a set of electric gates I have. They are connected to a WiFi switch, so I use HA to manipulate it in certain conditions, like opening the gates when we are coming home etc. One function I have set up is to close the gate when we get on the drive, which involves the WiFi on the car triggering an automation to close the gate (this is for safety so we can get our kids out of the car and not worry about them runing on to the road). I tried doing it with just a zone trigger, but this was not reliable enough.

The problem is, is that when we come to leave the house, and open the gates, starting the car causes the WiFi to connect again, and thus closes the gates. I have looked at conditions to see if I can show some sort of move from one zone to another - i.e. showing a return home, but this does not seem to work. It would be good if I could if I could create a zone on the entry road to my house as a trigger or condition, but then I would still be outside of the zone when the car WiFi connects coming home.

I cannot think of any other devices or connections I could use as a trigger or connection as a ‘just coming home’ or ‘only coming home’ - I think I need to use the zone function some how, but this seems to be more restrictive on the condition side of automation than on the trigger side. I’m also not good with yaml, so tend use the visual editor, so if ideas need yaml, I’ll need a bit of hand holding I’m afraid.

Thank you all for your help!