I have a Huwaei P20 with Android 8.1 and the "Local Connection Switching" just won't work. And yes, I gave the location permission to the App...
It always trys to connect to the primary address, like it just won't recognize my ssid.

I saw e few topics here about this issue, but non of them were really resolved or it just was always the location permission problem with Android 8.1+.

Any ideas, how to fix this?
I just solved the Problem by googling arround :-)
The location-service has to be active to make it work!

From another Website:
Since Android 8.1, it's necessary for apps which want to determine the active WiFi name (SSID) to have the location permission, that location services are actually active (usually by enabling "location" in the Android quick settings).
This is because the WiFi name/SSID can theoretically be used to determine your location. For example, imagine that you're in the WiFi "Berlin Public Transport" – apps which can read this information could track your location just based on the WiFi name.