Thank you for adding the get() function back into the statistics object. I can get it to work for binary data types, but I can't get it to work for multistate data.
var bulk = 1; var stagePastDay = stage.past(DAY); var bulkHours = stagePastDay.data.get(bulk).runtime / (1000*60*60); return bulkHours;
Script error: TypeError: Cannot read property "get" from undefined in <eval> at line number 3 in <eval> at line number 3
If I replace "stage" with a boolean datapoint, it works fine.
I also tried using .getStartsAndRuntime(), but that also did not work. Even the .getStartsAndRuntime() example from the "Mango Java Script" help page did not work.
How can I obtain the runtime of a given state in a multistate datapoint?
Have all the examples in the "Mango Java Script" been verified to still work after the changes?