2015 200 s 4 cylinder:

A few months ago my wife was in a small accident. The damage to car was minimal on driver side corner of the bumper. The light lens on plastic bumber guard was cracked. The next day after getting the car home i noticed the driver head light was not working along with the radiator fan or A/C the other thing i noticed is the outside temperature reading was 185 degrees. I removed the front of the car to expose wiring and what ever i could find that might be stopping these things from working. This was done after i determined that all fuses were good but i was not getting a ground on the headlight plug. What i found is that a plastic plug with several wires about 20 going in and out was smashed and not making a good connection, so with a wiggling and pushing i get in the and the a/c clutch engaged and the a/c started working along with the fan but no head light and the outside temperature had the correct read 80 degrees. I taped up the plug nice and tight started the car and tried everything again and nothing worked outside temp reading 185 again. so got back in there and wiggled and pushed on the plug again and it worked again but no head light the outside temp reading correct again. I decided to bypass the plug and butt splice all the wires. Started the car and the headlight was working but not the fan or a/c clutch not engaging. I bought and installed a new Ambient temp sensor but no success. what i did notice while rewiring the plug that two wires from the ambient temp sensor going in the plug are purple w/ blue stripe but on the other side of the plug coming out is a purple w/ purple stripe wire and a black wire the goes to nothing but there is some sort of black rubber piece crimped on the end. it has silicon on the ends to stop water intrusion. does anyone know what this little black thing is and what it does. is it possible that this thing has a short or is broke not letting the a/c clutch engage. i read online that if the ambient temp sensor is not working the a/c clutch wont engage. Any help is appreciated i been at this issue for a couple months.