I ran into the cable temp sensor issue when I replaced a Western Digital (8-pin connector) with a Seagate SSHD (4-pin connector). To resolve it I purchased the OWC temp sensor kit for 2009-2010 iMacs. Unfortunately it did not work with the sensor installed on top of the spindle. The problem is that there is not of clearance and it ends up touching the back on the display and when the screws are reinstalled the computer will not turn on.
OWC's product almost works as described, but is not the best solution. I recommend opening your iMac up to see what type of drive you have and getting the official temp sensor adapter cable from and Apple part supplier (on eBay too). They are around $20 and there is one for each drive manufacturer. The easiest solution is to buy a drive from the same manufacturer and it most likely will have the same sensor plug. I know that some mods can be made to the cable end to get it to fit, but I don't see how the 8-pin plug could be modified to be put into a 4-pin jack.