Skip to content

SEM Next: a second dashboard with five screens by question (#1321) - #1322

Draft
traktore-org wants to merge 111 commits into
developfrom
feature/1321-dashboard-next
Draft

traktore-org wants to merge 111 commits into
developfrom
feature/1321-dashboard-next

Conversation

@traktore-org

@traktore-org traktore-org commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

SEM Next — a second dashboard (#1321)

Five screens, created on request with generate_dashboard (template: next). The classic dashboard stays.

  • Now — one power bar (sources above, sinks below); tap it for every number. Today tiles with sparklines, today's plan rows, why now, money, signals.
  • Plan — the price strip with the plan drawn on it, Today | Tomorrow, tap a block for its reason. Per car: Skip, Start now. A visible "Why this plan" list and the battery level at the end. Expected cost, decisions today.
  • Devices — one card per device with a rank badge; Reorder mode (drag or arrows) writes the priority order. Surplus and peak on top.
  • Insights — one period for every chart: energy, power, battery, car, money, forecast, replay. Charts are plain SVG; the Sankey is optional.
  • System — health first, what SEM held back, then settings as sentences with one Apply.

No HACS card is required. Every classic feature has a place (list: the mockup's Checklist tab).

Proof: 725 node tests, the card and translation tests, .175 render of all ten views (phone and desktop) with no error card, no overflow, no console error. Deployed to HA-TEST (validate green) and PROD as a soak.

Review round, 13.11

In the dashboard now:

  • Charger names come from your setting, in every language.
  • Now: the source mix, a 24 h price strip, a row of device chips.
  • Plan: a "Why this plan" list, the battery level at the end, a "Charge plan" button. The timeline fits a phone.
  • Devices: a charge-plan chip with a pencil, a pencil on every value you can change, a reserve mark, a row per battery, the heat pump's cost and next run.
  • Insights: the average price paid against the hours' average, on dynamic tariffs.
  • System: the entity each source reads.

Not done, and why:

  • Move, and skip or start for loads: they change what SEM does and need their own test first.
  • Bottom tab bar: it fights Home Assistant's own tabs.
  • Hub layout and phone-only screens: a second layout to keep right.

Created on request (generate_dashboard template: next) at /sem-next beside the
classic dashboard, which stays as it is. One bundled card per screen: Now, Plan,
Devices, Insights, System, each opening with a line in words.

Claude-Session: https://claude.ai/code/session_01UikL7Pp2n5Kub4UGUJ1quW
…available, not when its value stands still; show SEM's own degraded-inputs verdict

Claude-Session: https://claude.ai/code/session_01UikL7Pp2n5Kub4UGUJ1quW
… with sparklines, today's plan rows, why now, money, signals
…e rows with skip/move/start now, expected, decisions today
…r with handle and arrows, surplus and peak, charger, battery and load bodies
…me in the why row, string count, staggered zone labels, comfort row only when set
- One message at the bottom of every screen, red when Home Assistant refuses.
- Plan: Skip, Start now, Back to plan and Charge now show as done only after Home Assistant accepts them.
- Plan: Move removed; SEM stores it but nothing acts on it yet.
- Now: the car's reason in the user's language. SEM publishes the reason code next to its text.
- Now: a few watts of meter noise no longer fill the power bar.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
Loads start folded, chargers and the battery open. A tap opens or folds a card, and the browser remembers it. Open all / Fold all next to Reorder. One column, ranked top to bottom.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
It read solar only. Solar holds 0 W all night, so it said "38 min ago" while grid, battery and car were live.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
Checked every number on the five screens against PROD and fixed what was wrong:
- Peak values were 1000 times too small.
- Saved left out the battery.
- The 92 % floor read as if the battery held it.
- A null cost showed as 0.00 CHF.
- Cheap/expensive appeared on a flat tariff.
- The car session read 0 kWh.
- Circuits SEM can't switch offered modes.
- Own supply had three different numbers.
- Raw planner text and ages for unchanged readings were shown.
- Times follow the home's time zone, not the browser's.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
SEM's 11.7 kWh is what its power readings see per full charge, not the pack's size. The pack's own counters show about 15.5 kWh. The card says so and drops "drift -22 %".

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
The 1 kW placeholder showed as "~1.0 kW", like a measured value. SEM now publishes rating_measured next to power_rating, and the cards use it.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
On a day whose home row is the meters' balance, the published flow split is scaled so each source and sink matches its daily total. The integrator keeps its raw sums.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
The plan priced only placed demands. With nothing to place it published no cost, and the house's own grid draw after the battery ran out was never counted. Now total_cost = placed demands + the house's draw at the slot prices. It is unknown (with a reason) only when a slot the house draws in has no price. The placed demands' cost alone stays the decision, so a moving house estimate does not restamp the plan.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
…, charger, hide rules, plan notes

The peak limit is one question in System and on Devices (peak-questions.js).
The battery's levels, help, pacing, selling and reserve are asked once, on the
battery row in Devices (battery-questions.js); System reads them back and links
there. The charger row uses the shared target pair, departure and mode names
(charger-questions.js), and the charger's why-line comes from one helper
(chargerSays) in the new Now card and the classic EV card. next-applies.js is
merged into settings-applies.js. Planner notes go through plan-notes.js.
19 texts nothing used any more are removed; one new text in 16 languages.
A cross-card test draws both dashboards from one state and compares them.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
The Now card printed 'Next: comfort:hot_water at 06:00': a heater's Keep at
run kept its plan id. One reader (util/plan-ids.js) now names every plan id
— the Now card's next block and waiting loads, the plan chart's rows and
the plan card's load rows — and falls back to the key as words, never the id.
A heater's Keep at run counts as its next run on the Now card, and its note
goes through planNoteText like every other planner note.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
…language

SEM Next parsed the charger's translated friendly name with an English
'… Power' pattern, so a Dutch install ('SEM Laadpaal Links Vermogen')
showed 'ev charger 1'. All charger names now come from one reader of the
charger_name attribute SEM already publishes (#1053); the classic EV,
charger and chart cards use it too and no longer parse friendly names.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
The sidebar names follow the owner's choice; the URL paths stay
(/sem-next, /sem-dashboard) so bookmarks keep working. The names change
when the dashboard is generated, as titles always have.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
… and a chip per device; System names the entity SEM reads

From the review of PR 1322: the source mix in percent stays visible under
the power bar, the money section ends with a 24 h price strip coloured by
the install's own price levels with a now mark (none on one rate), and a
row of device chips opens Devices. System's source tiles show the value and
the real entity SEM reads. Added only; nothing on the screens is replaced.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
… plan, the battery its reserve

From Rien's review: a visible "Why this plan" list (what, when, why per
device), a "Charge plan" link on each charger row, a battery-at-the-end
tile when the plan publishes it. On Devices: an always-visible charge-plan
chip with a pencil, a pencil on every editable value, the reserve mark and
the kWh above it, each battery's own level and power, the heat pump's cost
of heat and next run, and cards folded on phones. Insights shows the
average purchase price against the market when SEM publishes it. The
timeline no longer forces a width wider than a phone.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
…tegrated

# Conflicts:
#	CHANGELOG.md
#	coordinator/coordinator.py
#	dashboard/card/dist/sem-cards.js
#	dashboard/card/sem-localize.cs.js
#	dashboard/card/sem-localize.da.js
#	dashboard/card/sem-localize.de.js
#	dashboard/card/sem-localize.es.js
#	dashboard/card/sem-localize.fi.js
#	dashboard/card/sem-localize.fr.js
#	dashboard/card/sem-localize.hu.js
#	dashboard/card/sem-localize.it.js
#	dashboard/card/sem-localize.js
#	dashboard/card/sem-localize.nl.js
#	dashboard/card/sem-localize.no.js
#	dashboard/card/sem-localize.pl.js
#	dashboard/card/sem-localize.pt.js
#	dashboard/card/sem-localize.ro.js
#	dashboard/card/sem-localize.sv.js
#	dashboard/card/sem-localize.zh.js
# Conflicts:
#	dashboard/card/dist/sem-cards.js
#	dashboard/card/sem-localize.cs.js
#	dashboard/card/sem-localize.da.js
#	dashboard/card/sem-localize.de.js
#	dashboard/card/sem-localize.es.js
#	dashboard/card/sem-localize.fi.js
#	dashboard/card/sem-localize.fr.js
#	dashboard/card/sem-localize.hu.js
#	dashboard/card/sem-localize.it.js
#	dashboard/card/sem-localize.js
#	dashboard/card/sem-localize.nl.js
#	dashboard/card/sem-localize.no.js
#	dashboard/card/sem-localize.pl.js
#	dashboard/card/sem-localize.pt.js
#	dashboard/card/sem-localize.ro.js
#	dashboard/card/sem-localize.sv.js
#	dashboard/card/sem-localize.zh.js
…rated

# Conflicts:
#	CHANGELOG.md
#	dashboard/card/dist/sem-cards.js
#	dashboard/card/sem-localize.cs.js
#	dashboard/card/sem-localize.da.js
#	dashboard/card/sem-localize.de.js
#	dashboard/card/sem-localize.es.js
#	dashboard/card/sem-localize.fi.js
#	dashboard/card/sem-localize.fr.js
#	dashboard/card/sem-localize.hu.js
#	dashboard/card/sem-localize.it.js
#	dashboard/card/sem-localize.js
#	dashboard/card/sem-localize.nl.js
#	dashboard/card/sem-localize.no.js
#	dashboard/card/sem-localize.pl.js
#	dashboard/card/sem-localize.pt.js
#	dashboard/card/sem-localize.ro.js
#	dashboard/card/sem-localize.sv.js
#	dashboard/card/sem-localize.zh.js
#	dashboard/translations.json
The battery at the end comes from plan.battery_end, the Why list from each
plan demand's why code, and the average price paid from the cost sensors'
avg_price_paid / avg_price_hours (dynamic tariffs only).

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
@traktore-org

Copy link
Copy Markdown
Owner Author

@RienduPre, thank you, this helped a lot. Most of it is in the dashboard branch now, and the charger names are fixed. I listed what changed, and what waits and why, in the description above. Could you proofread the Dutch texts?

…-heat reason

Devices: the heat pump's COP by outdoor temperature as text under All
settings, with the COP now; only a whole curve or an empty box is sent.
Plan: the cheapest_heat why names the mean COP.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
…OP (#1081)

SEM-dashboard: under More, a heat pump shows "COP used" (Fixed, My curve,
Learned) and how many hours the heat meter has taught.

Claude-Session: https://claude.ai/code/session_01UikL7PL23jjzZtjyqe4P8w
# Conflicts:
#	dashboard/card/dist/sem-cards.js
#	dashboard/card/sem-localize.cs.js
#	dashboard/card/sem-localize.da.js
#	dashboard/card/sem-localize.de.js
#	dashboard/card/sem-localize.es.js
#	dashboard/card/sem-localize.fi.js
#	dashboard/card/sem-localize.fr.js
#	dashboard/card/sem-localize.hu.js
#	dashboard/card/sem-localize.it.js
#	dashboard/card/sem-localize.js
#	dashboard/card/sem-localize.nl.js
#	dashboard/card/sem-localize.no.js
#	dashboard/card/sem-localize.pl.js
#	dashboard/card/sem-localize.pt.js
#	dashboard/card/sem-localize.ro.js
#	dashboard/card/sem-localize.sv.js
#	dashboard/card/sem-localize.zh.js
#	dashboard/translations.json
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.

2 participants