Define multiple wifi networks

hi,
I use my HA on a rpi on a boat, sometimes I can bring the rpi home to make modifications. I then need to change the ssid to my home wifi.
Is there a way to define multiple wifi credentials in HA so it will connect to whichever one it can ?
thks

Not sure you can define multiple wifi networks, but if you’re home, why not simply plug the Pi into the network with an Ethernet cable? You’d have to set up the wired network in the Network Settings page, but it’s a 1-time job.

Alternatively, use your mobile as a hotspot and provide the same SSID as that of your boat.

I BELIEVE it keeps credentials of previous SSIDs and connects based on last connection (or something similar). I have it in my RV and it connects to my home WiFi as well as my in-laws automatically (at least that’s my memory, it’s been a while since I’ve ran it at their house).