How to make a temperature controlled switch