Elapsed Time for on state

Hi @Jonathan_Betke,

It seems this functionality would be very beneficial as a built-in platform tool and has been a popular request. I will give the Feature Request a +1 and update you in the near future on its status.

In the meantime, there is a similar post here detailing how you could store the number of hours it has been active, but in your case the “threshold” would be “on” and “off”. This example would only update after the state has changed, however.

Currently, the way I would determine the total time active could only occur in an Experience Page. On render, you could use a Device: Get Node to get the last state. If the device is “on,” you could take the timestamp of that state and compare it to now, getting the total time since the last state report of “on.” If you add this “since last on” value to the “total running” time, you would have the total historical uptime of the pump.

Let me know if I can answer any further questions!
Julia