callback for error handling in setTemperature.