Skip to content

v2.2.4

Choose a tag to compare

@hoizi89 hoizi89 released this 08 Jun 09:47

🐛 Bug Fixes

Self-consumption could decrease → savings reverted

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).

(Same root cause as hoizi89/pv_management#14.)

✨ 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 power sensors were configured. They are now only created when both pv_power and house_power are configured, keeping the device free of permanently-unavailable entities.


Full Changelog: v2.2.2...v2.2.4