WiFi on rPi4 - Preferred network

I have Home Assistant running nicely on a Raspberry Pi 4+ and have it connected to the WiFi router at my home (rental). However, I also have a Ubiquiti Unifi networking setup I use in a rack case that I take on gigs, but I sometimes use it at home when I am testing/updating stuff. When I do that I have an access point with a different network SSID and subnet to the home router. Is there a way to set up HASS so that when I turn on my Unifi gear it connects to that SSID as a preferred network and it reverts back to the home router’s SSID when I turn off the Unifi gear or do I have to change the WiFi config manually each time?