There’s also this which may be a better solution: Powercalc - Virtual power sensors has virtual energy sensors too.