Phone already does that.
When the phone senses that I have connected to my my home wifi network I want it to toggle a widget to a Webdev server program turning it on.
This also could be when the phone senses I'm at home via GPS it toggles the same thing. Whichever one, no preference.