What DTC did your scanner throw? B2630? B2631? Any others?
The sunload sensor may register a malfunction when indoors, at dusk, or at other times when light is insufficient. When performing the diagnosis indoors, use a lamp (60 W or more) that is pointed at the sunload sensor. The sunload sensor is located to the left of the defrost vents on the dash.
Were you scanning in your garage? DTC B2631 indicates that the sensor is seeing less than 33W/m2, so the A/C auto amp. is thinking something's fubar.
Of course, the DTC could mean a bad sunload sensor, a harness or connector problem or even a faulty A/C auto amp. You say your A/C is working correctly though, so it's probably not that drastic.