• Good catch with the division. I've now added the try/catch to see if the issue is with that.

    Regarding L68, I'm not sure it is acceptable practice, but it was a trick I found to round a number to x decimal places. If that is the issue, then the try/catch should catch that, although I've been using the same snippet in other work, so I'd be surprised if that is the issue.

    Thanks for the tips, I've updated the Puck code so I'll wait and see what gets logged out.

  • 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 AkosLukacs @AkosLukacs started