UX-54: a Forecast tab with the sun, the house and each battery's level, per hour
checks / unit (pull_request) Successful in 48m29s
infra-pin / fresh (pull_request) Successful in 1s

A new tab beside Home and Batteries for today and tomorrow: the solar
forecast, the solar measured so far, the house's expected use and each
battery's expected level, with the plan's own charge and give blocks under it.

- Blocks are Home's: today's are the plan's `runs`, tomorrow's come from the
  same builders (`homeview.runs_for()`), in the plan lines' words.
- The sun is what solarfc reads; a daily total is spread over the bell and the
  tab says so. The house is HouseProfile.estimator(), as the plan reads it.
- The level is new: `daycurve.curve()` gives each battery the role
  `modetrade.decide()` gives it and moves it hour by hour inside the plan's
  floor and ceiling. It is an estimate and counts on `solar_trust_pct`.
- Built on request (`GET forecast`), no Home Assistant call. Measured solar is
  kept per hour in memory from the reading control already takes.
- A part not known yet is a note: modes off, no forecast, learning, no
  forecast for tomorrow, a monthly cycle, no level, stopped, shadow.

No decision, command, timing or option key changes. Found, not changed:
`dayplan.plan()` over-counts a state-only forecast (DECISIONS/UX-54).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
This commit is contained in:
glenn schrooyen
2026-10-26 19:38:59 +01:00
co-authored by Claude
parent a1d07030f8
commit b6b2d1b184
16 changed files with 1912 additions and 11 deletions
+15
View File
@@ -3530,6 +3530,21 @@ the peak limit, the batteries' switches and modes, and shadow mode, each
marked "Applies right away" or "Applies after a restart". **Installer** shows
every setting.
### The Forecast screen
The **Forecast** tab shows today and tomorrow, hour by hour: the solar forecast,
the solar measured so far today, the house's expected use, and each battery's
expected level. Under each battery's chart are its planned blocks, in the same
words as Home. A block is there only where the add-on plans one.
The level is an estimate. It counts on `solar_trust_pct` of the forecast, as the
plan does, and stays between the battery's low and high levels. A forecast that
gives one total for the day (Forecast.Solar) is spread over the hours, and the
screen says so. Where a part is not known yet (battery modes off, no forecast,
still learning your house, no forecast for tomorrow) the screen says that
instead of drawing an empty chart. It changes nothing in control, and it asks
Home Assistant for nothing: it is built when you open it.
### Setup, for a new install
The **Setup** tab walks an installer through six steps: the meter, the