The EGR sensor is part of the EGR valve. The sensor is used to tell the engine computer what the EGR is doing. GM has had a issue with the EGRs on this car. They have a update part and software for the engine computer. This should take care of the issue. Here is some of the information:
#06-06-04-008B: LNJ Service Engine Soon (SES) Light On, Multiple Powertrain Control Module (PCM) Diagnostic Trouble Code (DTC) P1404 and/or P0404 (Install EGR Valve/Gasket/Pipe/Wiring Harness Connector,Reprogram PCM) - (Mar 19, 2007)
Some customers may comment on a Service Engine Soon (SES) light illuminated on the instrument cluster. Some vehicles may have previously been serviced for this same condition. Technicians may also find a DTC P1404 and/or DTC P0404, which may have led to previous exhaust gas recirculation (EGR) valve and PCM replacements.
Important: The following EGR valve service parts kit, P/N 89018176, contains all the required individual parts needed to perform an EGR system change-over for the vehicles listed in this bulletin only. Please be advised that some early produced kits may contain an instruction sheet that has an error in the wiring portion of the procedure. Therefore, it is advised that the instructions included in the kit be discarded and that only the instructions contained in the bulletin be used.
Important: This EGR valve kit is used to convert a Delphi EGR valve equipped LNJ engine used in the Chevrolet Equinox and Pontiac Torrent to a Siemens valve. This kit contains all necessary parts for conversion. The Powertrain Control Module (PCM) calibration must be updated for the Siemens EGR valve to work correctly. Failure to install an updated calibration when using this conversion kit may cause PCM diagnostic codes to set, resulting in a "Service Engine Soon" indicator lamp to illuminate.
What code was setting to make you replace the EGR valve?
You need to make sure you have 5 volts on the gray wire going to the valve. This is the voltage supply for the sensor.
If you had the same code, make sure it was cleared after the repair, also inspect the connector at the valve to make sure you do not have a broken wire at the connector.