WARNING: This page is about a different car, the 2002 Toyota 4Runner. However, it is still accessible from the selected car via links, so may be relevant.
This sensor detects the ambient temperature and sends the appropriate signals to the A/C control assembly.
Fig 1: Defining DTC 12 Ambient Temperature Sensor Circuit