Driver Side Door Courtesy Switch Circuit: Description
WARNING: This page is about a different car, the 2011 Toyota Avalon. However, it is still accessible from the selected car via links, so may be relevant.
The door courtesy turns on when the door is opened and turns off when the door is closed.
The body ECU detects the condition of the door courtesy switch.