Looking at the code, it seems like it should work (or if it breaks it should return something other than 255) - my guess is that E.getTemperature() might actually be working correctly, and it's something else further down the line that's getting confused.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
How exactly did you report the temperature back?
Looking at the code, it seems like it should work (or if it breaks it should return something other than 255) - my guess is that
E.getTemperature()
might actually be working correctly, and it's something else further down the line that's getting confused.