Switch for motor