check the relay for the fan. See if you bypass it if it comes on, or just swap it with another relay in the group and see if it comes on when the a/c is turned on then.

Or you might have to do some trouble shooting with a meter to figure out where your power is missing.

Odd that it comes on when you unplug it from the temp sensor, could just be a bad temp sensor. But since the a/c doesn't care about the temp, I would lean towards the relay.