Engine coolant sensor?

Thought it might help if I posted this in the right place, been trying to sort out the idle on my 1.5 L Eunos(Mx-3 but Jap version). Managed to do the Ten + grd jumpwire and set the idle to about 8-900 rpm, but as soon as I remove the jumper wire the idle goes down to 500rpm again. Dont know if its to do with the heat over here, Cyprus and 95 in the shade at the moment, also surges bad if A/C is put on. What I have found is what looks like a broken sensor in the thermostat housing ie the plastic connector part is missing! The only plug that is in the area of the thermo is a 2 wire plug and both wires go together onto a spade end,(coloured Black + Green stripe and Black with pink stripe- poss faded Red) this plug goes to an earth spade on the block. The plug looks like a proper plug not a bodge up. So does anyone know if ,on their cars, does this plug fit to a sensor on the thermostat with the two wires joined or should the 2 wires be separated to individual pins? or any other suggestions please.(clean ones I mean)
Cheers

How does the coolant temperature sensor "CTS" work?
The coolant temperature sensor is a thermistor ( a resistor which varies the value of its voltage output in accordance with temperature changes. ). The change in the resistance values will directly affect the voltage signal from the water thermosensor. As the sensor temperature decreases, the resistance values will increase. As the sensor temperature increases, the resistance values will decrease.
The coolant temperature sensor lets the engine control computer know what the engine temperature is by gathering information from the engine coolant temperature.
The most common coolant temperature sensor location is near the thermostat housing, sometimes the computer uses the same sensor to operate the temperature gauge in your instrument cluster, depending on the car make and model.

If your vehicle is equipped with what seems to be two coolant temperature sensors , your car has a coolant temperature sensor and a coolant temperature sending unit, the coolant temperature sending unit operates the temperature gauge in your instrument cluster and the coolant temperature sensor sends the signal to the engine control computer to transmit the correct engine temperature, the way to recognize which one is the sending unit and which one is the actual coolant temperature sensor is to unplug the electrical connector and see how many wires are attached to it, the CTS has two terminals, while most temperature sending units only have 1.
iirc the sensor is by the theramstat housing, if you have faulty wiring or even a faulty sensor this will effect the idle and running.. from the description you have given id say your looking here for the fault…

Thanks Rainmaker
my car does have a guage sender (2 wires going to a spade terminal on the engine block) and also this broken sender on the thermostat housing). I could not find a loose plug & wires anywhere near the thermostat but noticed a pair of wires going to a circular connector underneath a nut on the head. Also there was another pair of wires in a black plug, both wires joined together to the female part of a spade terminal, connected to a bracket holding other bunches of wires and a male spade terminal and the plug is fitted to that. I figure that when the thermostat sender was broken someone just put the signal wires to earth to fool the ecu. Also, I have had to change the TB as it had been bypassed from the coolant as the inlet/outlet pipes had rusted away. Just got to figure which pair of earthed wires are the ecu signal wires. Any clues?

Hi, sorry for not replying sooner but been away from home. Had a mechanic take a quick look at my engine and he pointed out the coolant sensor for the ECU further back on the block. He reckons the thermostat housing must be a replacement from a different Mazda and the broken sensor has no function on my engine. he reckons the MAF might be the cause of my bad idle, but he then adjusted the throttle stop to raise the idle to 1100 - 1200. In the evening ( cooler air) she idled at 1500, I even put it into neutral and coasting at 50mph it stayed at 1500. Figured as he had opened up the TB butterfly I could adjust air screw( with jumper wire) back down to slower idle so did that and sure enough she ticked over at 800-900 but the screw is now only half a turn from bottom. Also adjusted TPS fraction at a time till it stopped surging when A/C was switched on. Ran perfect for a day - no surging but steady idle and not dropping with A/C on or when coming to a stop at lights etc. Now a day later she still idles at 800 - 900 but has started bouncing if A/C on and coming to a stop. Nearly back to square one.