An electrical device for performing a particular function includes a system circuit for performing the function, and a dedicated power supply for providing power to the circuit. Both the system circuit and the power supply are hermetically sealed within a housing. The device within the housing is intended to be sterilized using high temperature, reaching a sterilization temperature. According to the invention, the device includes a thermal switch which is electrically connected between the system circuit and the power supply. With the present invention, the electrical components of a device are automatically protected from thermal damage during sterilization.