My mechanic says the thermostat in my car's air-conditioning system needs to be changed. What is the function of the thermostat?

The thermostat helps to maintain the temperature of the car's interior at the desired level by controlling the flow of heat energy in or out of the air-conditioning  system.

A detective thermostat is the leading cause of erratic temperature within the car. There is little you or the mechanic can do to fix a faulty thermostat. Replace it.