• I think you don't have to format the currentkWh on the puck.

    Just use toFixed on the display page. For example:

    var kwh = 1234.56789;
    console.log(kwh.toFixed(2))
    "1234.57"
    

    Separation of data & display concerns :)

About

Avatar for Fisu @Fisu started