Is the sensor defect? I checked the wires and changed the analog pins but nothing helped. I am wondering what is going wrong since everthing looks fine until i try to measure some changes in temperature. The code is correct because the sensor values fits to the other data, but its value itself behaves unrealistic...

I have the exact same thing. When you start all is normal, but as soon as you touch the sensor it goes up to the unrealistic high values and won't come down again. When you unplug the Arduino and plug it in again, the sensor returns the correct value again and it all starts over again..

I've had the same problem as mech_1794 and deterr. If I set my baselineTemp to something much higher, say 70 C, then the temperature sensor works fine (5-10 degree increases in temperature in the monitor when I touch the sensor, and then back down when I remove my hand) but none of the LEDs get activated.

Alternatively, if I set the system to run and touch the TMP36 so that it spikes up and registers temperatures around 70 C, and THEN pull out the LEDs one by one, I see the temperature sensor drop back down 10-20 degrees at a time until it's back in the normal range.

Could there by an ungrounded signal or something causing some interference? Would another resistor connected somehow to the temperature sensor pull down any stray voltage?

I've had the same problem as mech_1794 and deterr. If I set my baselineTemp to something much higher, say 70 C, then the temperature sensor works fine (5-10 degree increases in temperature in the monitor when I touch the sensor, and then back down when I remove my hand) but none of the LEDs get activated.

Alternatively, if I set the system to run and touch the TMP36 so that it spikes up and registers temperatures around 70 C, and THEN pull out the LEDs one by one, I see the temperature sensor drop back down 10-20 degrees at a time until it's back in the normal range.

Could there by an ungrounded signal or something causing some interference? Would another resistor connected somehow to the temperature sensor pull down any stray voltage?

I troubleshooted this down to the LEDs just as you did but instead of pulling them out I ended up toggling the light on then off so that it didn't affect the sensor. There's probably a better way to write this but here's a piece of my code that worked for me: