This is a (final?) fix for issue #34 , where average peak hour energy resets randomly.
The root cause here was a architectural change in HA that caused a race condition when restoring sensor state.
Many thanks to everyone who contributed their sensor data so that this could be fixed!