By the pictures you are showing, the part you are calling the temperature sensor is actually the fan switch and the socket you are showing with your hand is the A/C high pressure switch socket
The circuit is wired up as
relay - 2 pin A/C switch - single pin fan switch.
Its done this way because the toyota switches work in reverse - if the A/C high pressure switch opens up the fans will turn on, If you are not using A/C the switch remains shorted connecting the fan switch to ground and the circuit only opens when the single wire fan thermoswitch breaks ground connection hence running the cooling fans
The gauge temperature sensor is before the thermostat not after it. It would be near the water pump, look at the back of the engine for a single wire sensor.
Take a multimeter or line tester and trace the wires, one wire from this socket should be leading to the fan switch, and one wire should be leading to the relay in the fuse box. It would confirm this is the A/C high pressure switch.
Does your car have 1 or 3 fan relays? - 1 relay is for single speed fan and 3 relays are for dual speed fans, they work on low speed (in series) with A/C function and only switch to high (parallel) when the A/C pressure switch or engine thermoswitch opens up taking the fans to full speed.
here is a general diagram to make it simple
