This is awsome!! Great work
Make the following changes.
line 33 changed to
lines = temp_raw(sensorid) #sensorid is missing in the function call
line 46 changed to
for n in range(1, sensorcount+1): #because range(1,3) returns only 2 numbers [1,2] and if we do sensorount+1 i get range (1,4) and the return is [1,2,3]