Thanks for that. I got a local garage to use their diagnostic machine which they said should confirm whether any wires are shorting. They said it was definitely the sensor, which is baffling as I've just had it changed. Having googled further I realised that the part I ordered (based on the product code on the BMW website for a 'coolant temperature sensor') was for the sensor on the radiator outlet.
Is this part definitely the coolant temperature sensor?
I've scoured the internet and realised that there is a sensor under the manifold that is supposed to be what provides the reading for the temp gauge on the dashboard. But am at a loss as to whether this is also called a coolant temperature sensor or not. Further googling tells me this sensor under the manifold would come up with a P0118 fault, rather than the P0117 sensor. Any ideas if this sensor under the cylinder is actually the faulty sensor?
Below is the info i found online:
Part number 13621433077 - Located on radiator outlet hose.
-This sensor measures the temperature of coolant leaving the radiator, and is used to determine when the electric cooling fan should come on (if fitted).
Part number 13621433076 "Temperature sensor water/oil" - Located in the cylinder head, under the inlet manifold
-This sensor and the one below have the same part number (located under oil filter housing) but they will only measure coolant OR oil temperature, not both at the same time. This one is measuring coolant temperaure, which the ECU reads and uses for its calculations, and for the gauge in the dash.