I've noticed that sensor values are being handled as integers by this function, which was causing poor performance of the PIDArduino logic and another logic plugin I am testing. I have changed the type to float, and now logic controllers can receive more accurate temperature values.