I don't know if the statements made here about the state of wi-if and detection are actually correct. I believe there is a setting that you can turn on OR turn off wi-if detection that doesn't actually need wi-if to be "turned on". This setting is responsible for the alerts you see saying a wi-if connection is available. Smart Actions use to do what the OP is searching for, but with the release of ICS, Smart Actions isn't so "smart" anymore.
I tried using Tasker to perform these steps, but Tasker is a PITA. Now, I'm using Automateit and it works like a charm. As soon as I step into my home, Automateit detects my home network and turns wi-if on and connects to my network. It also toggles off Mobile Data. When I step out, wi-if is turned off and mobile data is turned on. All this happens in seconds.