Skip to content

fix(live): Home use as the plain balance; display and energy load as two series - #1768

Merged
frahlg-agents[bot] merged 4 commits into
masterfrom
fix/live-load-quality
Oct 21, 2026
Merged

frahlg-agents[bot] merged 4 commits into
masterfrom
fix/live-load-quality

Conversation

@frahlg-agents

@frahlg-agents frahlg-agents Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Restores live Home use (load_w) when a device is offline. Regression since #1592 (12 Oct, v0.141.2-beta.1), widened by #1733: qualifyStatusHistory overwrote live load_w with the history balance check, so any one offline/stale/missing device blanked Home use. Reported by Anders (Growatt offline after sunset, Pixii meter + battery read, v0.154.1). Supersedes #1767.

1. Live / display load — simple

  • load_w = site meter − every flow that is read, shown as is: negative values are shown (production Core cannot see), misconfiguration still shows a value. Null only when the site meter is missing, stale or offline.
  • load_quality (measured | estimated | unknown) + load_reason are hints only, never hide the value.
  • Offline battery/EV/V2X (incl. House load remains unavailable when loadpoint retains a nonexistent EV driver name #1744's nonexistent charger) left out → estimated. Duplicated flows (same charger as EV and V2X) are left out, never subtracted twice.
  • Unread PV after sunset at the site pin = 0 W (fix(history): count unknown PV as 0 W after sunset #1755's sun limits; twilight → estimated; by day pv_w null). Malformed PV is never replaced by darkness.

2. Two series, both logged

  • (a) display load: new Core metric series ftw:site / load_display_w written each history tick, exactly the value clients show (cmd/ftw/display_load.go).
  • (b) quality-assured load: unchanged existing path — source-energy history intervals with quality flags (recorded also when poor; history_quality), read by load-model training via HouseholdIntervals (fix(forecast): train load models on closed history intervals #1754), which filters on quality. The tick's history Load column stays the placeholder the source writer replaces, so (a) never reaches training.

3. Consumers

  • /api/status, app/Cloud snapshot (display value), support report (≈ x (estimated: reason), no forecast-miss claims on estimates), troubleshooting log.
  • HA: two sensors — Load Power (display, load_w) and new Load Power (energy average) (load_energy_w, energy-based HomeUseEstimate, None until a full window).
  • Web: shows negative balances; "estimated" / ≈ for estimates.

Tests

Anders night/twilight/day; meter offline/missing/stale → null; negative balance shown; misconfiguration shows value; #1744; offline battery; duplicate charger; malformed PV at night; live vs history quality; display series logged and kept out of history Load/training intervals; HA two sensors + discovery; web negative/estimated. Older strict-policy tests updated. go test green except internal/drivers locally (bundled Lua not in worktree). Web 867/867.

Codex (local)

R1: darkness hid invalid_sign PV → fixed. R2 clean. R3 (after this rework): duplicated flows double-subtracted in the live balance → fixed. R4 clean.

@frahlg-agents frahlg-agents Bot changed the title fix(live): Home use from the site meter; quality separate from history fix(live): Home use as the plain balance; display and energy load as two series Oct 21, 2026
@frahlg-agents
frahlg-agents Bot marked this pull request as ready for review October 21, 2026 06:19
@frahlg-agents
frahlg-agents Bot merged commit 01ab443 into master Oct 21, 2026
23 checks passed
frahlg added a commit that referenced this pull request Oct 21, 2026
/api/status always sent load_estimate, an energy-averaged Home use, and
the energy flow treated its presence as "estimated". Every box therefore
showed "≈" on Home use and never showed "% self-powered now", even with
every device read. The page now reads Core's load_quality only.

HomeUseEstimate came in on 18 October as the live Home use and was left
behind when #1768 made Home use the plain balance. It fed only
load_estimate and a second Home Assistant sensor that has not shipped.
Remove it, its observation buffers in the telemetry store and the HA
sensor, so Core has one Home use value.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

0 participants