A transfer switch configured particularly for use with traffic signal controllers, to enable a traffic signal controller to be powered by a portable electrical generator, when utility line power is unavailable. A housing, configured to be mounted either on the surface of a traffic signal controller cabinet, or recessed into an opening of the cabinet, so as to be flush to the surface thereof, is provided. The housing is configured to be substantially weatherproof without requiring the use of gaskets.