fan switch getting hot

If any resistance builds up, it will heat as said and eventually melt the plastic housing. YO migth be able to salvage it if you can't get another but maybe not.