The sensor on top of the dash will only detect daylight I think.. I believe the one that detects interior temp is the one left of the steering wheel on the dash, it's oval in shape and has horizontal slots in it.. But i don't think either sensor has anything whatsoever to do with your problem.
It sounds as if you have a small blockage in your heater matrix, it' lives behind the left hand side panel in the drivers footwell, disconnect the two pipes, take the matrix out and give it a good flushing till its clean, then replace it and all should be well heat wise..
However, you still need to find the water leak on the passenger side.. Do all the normal checks, = sunroof, plenum, windscreen seals etc..
...