* Fix flaky statistics tests * Tweak
* Weight sensor average statistics by state durations * Fix test
* Compile statistics for energy sensors * Update tests * Rename abs_value to state * Tweak * Recreate statistics table * Pylint * Try to fix test * Fix statistics for multiple energy sensors * Fix energy statistics when last_reset is not set