Hello, I have a point with instant power for a pump, in kW, is there a way to calculate total kWh consumption?

kWh Consumption

@georgestefan said in kWh Consumption:
Hello, I have a point with instant power for a pump, in kW, is there a way to calculate total kWh consumption?
I got the following from Energy Dashboard Demo;
return my.value + (InstantPower.past(MINUTE,1).average/60);

@morris What cron pattern should I use to run the script? Every hour?

That one is intended to run every minute (
.past(MINUTE, 1)
) so for a meta point you could doStart of minute
or0 * * * * ?
as your update event. 
Works well with this cron pattern, thank you!

Certainly!