temperature sensor API with testing