by Casper The Epic
Enable WireGuard VPN when not connected to a specific WiFI SSID, and disable when reconnected to that WiFi all without constantly running the loop.
****If you are having issues with wireguard auto starting or acting like it's not able to start your VPN you'll need to set wireguard to run unrestricted on battery****
Verified working for Pixel 6 Pro
Adds a check for mobile network connection before connecting to tunnel and a delay to make sure no issues happen, once it's connected it waits for the connection state to change for the loop to run again
Before using 1) in Automate>Settings, enable "Control Wireguard tunnels"
2) in wireguard make sure you check the box to let other apps control tunnels
3) Change the WiFi name to your home WiFi inside the WiFi SSID block
4) Change the Wireguard tunnel name in the UP and Down blocks to your wireguard vpn
Rate and review within the app in the Community section.