Skip to content

fix: apply dip compensation changes made during start-up, keep its default off (2.1.2b7) - #294

Merged
cayossarian merged 11 commits into
mainfrom
feat/dip-followups
Oct 8, 2026
Merged

cayossarian merged 11 commits into
mainfrom
feat/dip-followups

Conversation

@cayossarian

Copy link
Copy Markdown
Member

Release 2.1.2b7.

What changes for users

  • Turning energy dip compensation off or on while Home Assistant is starting now takes effect without another restart, once Home Assistant has finished starting. Until then, every Net Energy sensor stays consistent with its Produced and Consumed siblings.
  • Saving General Options no longer turns on energy dip compensation for an install that never enabled it.
  • Bundles SPAN Panel card 0.9.5.

Before upgrading

If you use energy dip compensation, check the energy_offset attribute of your Produced and Consumed Energy sensors first. Main Meter Net Energy and solar circuits' Net Energy take a one-time step for offsets booked before 2.1.0. Turning compensation off and back on before upgrading clears false offsets, as described in the README under Energy Dip Compensation.

How it was tested

  • 2067 tests pass, and mypy strict, ruff and every pre-commit hook are clean.
  • Deferred reload: an options change while Home Assistant is starting reloads once it has started, and repeated changes make one reload. Two panels changed together each get their own reload. Unloading first cancels it, and a deferral made after start still works.
  • Net consistency through the real coordinator fan-out:
    • Turning compensation off or back on before the reload keeps every Net equal to its siblings' difference. Main Meter Net reads 99, where it read 2209 before the fix.
    • A dip that is booked and then retracted leaves every Net flat.
    • A restart through the real platform restores offsets for Net's first update, and every entity ID stays the same.
  • Options: the real General Options flow, saved unchanged on an install without the option, leaves compensation off.
  • Mutation probes: keying the deferral by anything but the entry makes the two-panel test fail. Removing the offset gate makes the compensation-off test fail.

@cayossarian
cayossarian merged commit fddfa17 into main Oct 8, 2026
7 checks passed
@cayossarian
cayossarian deleted the feat/dip-followups branch October 8, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant