v4.2.4
π Bug Fixes
Self-consumption could decrease β savings reverted (#14)
The self-consumption total (a TOTAL_INCREASING counter) could drop when grid export rose faster than PV production β e.g. when the battery is full, or when the configured PV sensor measures "into the house" rather than gross PV generation.
The resulting negative delta was wrongly subtracted from the accumulated savings, making the amortisation remaining amount climb back up instead of down.
Fix: the self-consumption total is now clamped against its previous value, so the per-tick delta can never go negative. During export phases self-consumption simply holds steady (physically correct β marginal energy goes to the grid, not self-use).
Thanks to @Gremly84 for the detailed report, charts and root-cause analysis. π
β¨ Improvements
Only create sensors that can actually produce a value
The PV Surplus and PV Peak sensors were always created and showed up as "unavailable" when no house-power sensor was configured. They are now only created when house_power is configured, keeping the device free of permanently-unavailable entities.
Full Changelog: v4.2.2...v4.2.4