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. The thermal switch is switchable between an open position wherein the system circuit is electrically isolated from the power supply and receives no power therefrom and a closed position wherein the system circuit is electrically connected to the power supply and receives power therefrom. The thermal switch switches from its closed position to its open position in response to the temperature within the housing rising to a predetermined switch-open temperature value. The thermal switch thereafter switches from its open position to its closed position in response to the temperature within the housing cooling to a switch-closed temperature value. With the present invention, the electrical components of a device are automatically protected from thermal damage during sterilization.