v4.2.5
π Bug Fixes
Self-consumption not counted during export β #14 follow-up
With a net PV sensor (e.g. "inverter into house minus AC charging"), the formula self-consumption = PV β grid export effectively subtracts the export twice. During full-battery export periods this meant no self-consumption was recorded at all β even though PV was still covering the house load. v4.2.4 stopped the value from going negative, but did not restore the missing detection.
Fix: when both a house-consumption and a grid-import sensor are configured, self-consumption is now derived as house consumption β grid import β the textbook definition, independent of battery, state-of-charge, export direction and PV-sensor type. It keeps rising correctly even while exporting. Falls back to the previous PVβexport formula when those sensors are not configured. Adds two persisted baselines (consumption / grid-import) with lazy-init migration for existing installs.
Thanks again to @Gremly84 for the detailed reports. π
Full Changelog: v4.2.4...v4.2.5