Hinge with electrical switching function for fastening the door to the machine housing. An electrical safety switch is integrated to monitor the machine status. When the door is opened, several switch contacts are activated. This interrupts the electrical circuit and simultaneously signals that the door is open.