Energy counters setting and grid consumption bug fix

The calculation of the daily grid consumption had an error and is
corrected now.