Claan up and refactor new edge detection actions for TemperatureSwitch.