A code switch for an electrical appliance comprises triggering magnets at specific points in a rotatable rotor. Stationary opposite contacts are disposed in the housing of the code switch and wipers are provided with contact heads assigned to said opposite contacts at a disconnecting distance. When a triggering magnet is moved above an opposite contact by rotating the rotor, the contact head is pulled upward by magnetic force towards the opposite contact and the contact is closed.