* Enable Ruff PT022 * Adjust found cases
* 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
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>