The LEAF has a "sunload sensor" at the front of the dash on the passenger side (Nissan LEAF Service Manual, page HAC-137). It senses, well, the sun, and is of one the inputs into the automatic climate control.
Regarding its operation (Nissan LEAF Service Manual, page HAC-15):
"When the sunload...