Records for cumulative quantities (such as _dwh) are now calculated as
the sum, rather than average, of loop values.
Added watt-hour stats.