You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dashboard: savings card showing historical vs flat-rate #280
#279 ships the data path: `GET /api/savings/daily?days=N` returns per-local-day `saved_ore` plus totals. This issue is the UI on top.
Scope
A new `` web component, mounted on the main dashboard, that shows:
Headline total — saved SEK over the selected window (week / month), with the matching percentage vs flat-rate cost. Green when positive, red when negative. Mono numerics.
Range toggle — Week (7) / Month (30), same shape as `ftw-history-card`'s Week/Month switch.
Per-day sparkline — small bar chart of saved öre per day in the window. Bars are amber (`var(--accent-e)`) on positive days, dim on zero/negative days. Hover tooltip with the per-day breakdown.
Empty state — when `cfg.Price.Zone` is unset, the endpoint returns no days. The card renders a single muted line ("No price provider configured") and nothing else.
Design constraints
`DESIGN.md`: one amber accent only, mono for eyebrow labels and numerics, sans for prose, 1 px hairlines, no drop-shadows.
Tokens from `web/components/theme.css` — no hex literals.
Must work in light and dark mode automatically (token-driven).
No new web fonts — the Pi boots without WAN.
Files to touch
`web/components/ftw-savings-card.js` (new)
`web/components/index.js` — register the import
`web/index.html` — mount near the existing energy daily cards
Out of scope
`vs no battery` historical card (separate issue if/when state.DailyCostBreakdown grows that column)
Long-form analytics (a "savings over the year" page)
Activity
feat(web): savings-card historical vs flat-rate dashboard tile
feat(web): savings-card historical vs flat-rate dashboard tile (#281)
fix(drivers): bundle teslamate_vehicle 0.2.2 (#2086)