[Mobile app] Select a connection (local or external) to execute script

Here is my scenario why I have requested this feature.

When I come home I would like to open garage gate using my phone but I need to wait until my phone connects to local network. I don’t turn off wifi so it connects automatically when my home network is in range. It takes 5-10 second when connection is established and my gate opens.

I would like to request a feature to select which script should be executed on external connection only even if home wifi is connected or just connecting.

What???
This sentence just doesn’t make sense to me.

Do you want the garage to open every time your phone connects to wifi.
Perfectly possible but probably will not be a good idea.
If you want to control the garage then I think you need to get external access to Home Assistant to make it function in a good way

I’m sorry. Let me rephrase my sentence.

Every time when I come home, my phone starts connecting to my wifi home network. Outside, the signal is lower so it takes more time than inside a home. Then I want to open the garage gate but I need to wait until the wifi connects.

So I would like to have the possibility to open a garage door (e.g. execute a script or run a service) using only an external connection even if the wifi is connecting or connected.

Is it more clear than the previous description?

Perfectly possible using the wifi sensors from the app.
But it will falsely trigger unless you create some logic to handle quick dropoffs when you are home