I purchased a temperature sensor that connects to the Arduino quite some time ago. I finally got it working by finding the library and the discovery that it’s actually a digital output. I purchased a DS18B20, which is a three wire digital type job. The wires are 5v, 0v and the signal wire.
It seems to work, I also have a switch to over ride turning the fan on. I felt this was prudent in case I had set the ‘on’ temperature too high.