On your Camry's 5SFE, temperature is an indirect input at most.
From the service manual, here is what is necessary for the computer to throw a P0401 code and turn on the CEL:
"After engine is warmed up, intake manifold absolute pressure is larger than value calculated by ECM while EGR system is ON (2 trip detection logic)."
When the EGR System is ON, the following are true:
-- the EGR VSV does not have 12 volts applied to it;
-- the EGR VSV is electrically Off;
-- EGR VSV port E and port G are connected;
-- EGR VSV port E transmits vacuum to the top of the EGR Valve;
-- the EGR Valve is open;
-- exhaust gas is being recirculated.
A drawing to help:
I have had a fair amount of experience with P0401 on my 3SFE Rav4. I have also read many reports on eliminating this code on 3SFE and 5SFE engines. (The 5SFE engine happens to use the same cylinder head as my Rav4.) I know people do not want to fire the parts cannon. But the problem is that successful bench testing of either the EGR VSV or the EGR valve will not confirm these parts will operate correctly under all engine conditions. Also I think the age of many of these components translates to replacement being a sound investment, even if the problem is not fixed immediately. Lastly the hours DIY-ers and technicians alike often give to P0401 in my opinion argues for a systematic replacement of parts until the problem is solved. For these reasons I think the strategy to adopt is a step-by-step approach of replacement as follows.
-- Replace all EGR system vacuum hoses with high temperature resistant silicone hoses. Does this fix the code? If not, one has still just eliminated the chances of vacuum leaks in the future. The hoses are available on eBay. Some help appears here:
https://www.rav4world.com/threads/vacuum-line-replacement-with-high-temp-silicone-lines.255961/.
-- Clean the EGR valve and all connected ports. This includes the ports in the throttle body and the large pipe connecting to the bottom of the EGR VSV. Do the new hoses and clean EGR valve fix the code?
-- Go ahead and replace the EGR VSV with the Aisin version. It is typically available from rockauto or ebay or both. Does the new EGR VSV fix the code?
-- Replace the EGR vacuum modulator. Aftermarket is fine in my experience. Does the new modulator fix the code?
-- Replace the MAP sensor, preferably starting with a salvage yard one. Does the new part fix the code?
-- Check the EGR VSV circuit as given in the service manual, SFI Section. This is rarely the cause of the P0401, but the circuit's testing is free to do for anyone who has a multimeter. Go ahead and eliminate a possible fault in the wiring.
– Replace the gas filter. In 2023 I cleaned my old one with carburetor cleaner. Carburetor cleaner may or may not destroy the filter media. The main filter media appears to be brass wool. A magnet will not stick to the media. Here is a photo showing the location of the gas filter on a 3SFE engine.
-- If none of the above fixes the P0401, then I would next consider replacing the EGR valve (possibly starting with a salvage yard one).
-- Finally I would consider replacing the computer.
By my count, P0401 is the second most frequently reported code at this Camry sub-forum. It does not always get resolved.
I attach the service manual section for troubleshooting P0401.