The thermo sensor I'm speaking of is located in the air filter duct, just in front of the air filter.
It finds out the air temperature and reports it to the motor management, which determines
the air/fuel mixture by this data. If the thermo sensor is off duty, the motor management
runs an emergency program, assuming a temperature of 20 degree. This is not always suitable,
of course, and so you might notice stalling of the engine and bad throttle response, especially
between 3,000 and 4,000 RPM, and when the engine is still cold.
Most likely the thermo sensor is faulty. You can determine this by checking it
with a multimeter. If you measure any resistance, most likely 600-700 Ohm, the sensor is scrap.
On a new sensor, you won't see a resistance.
The thermo sensor is for 15.70 € at the next door BMW dealer's.
Changing of the thermo sensor is not difficult, and can be done by almost anybody.
Here's a step-by-step advice.
Pic 1: Location of the sensor | Pic 2: Removing the sensor | Pic 3: The thermo sensor | Pic 4: What will get when purchasing it |