Skip to content

fix(now): Core owns the house load when the charger overlay fills in - #112

Merged
frahlg merged 1 commit into
mainfrom
webapp-load-keeps-car
Oct 26, 2026
Merged

frahlg merged 1 commit into
mainfrom
webapp-load-keeps-car

Conversation

@frahlg

@frahlg frahlg commented Oct 26, 2026

Copy link
Copy Markdown
Member

Fredrik, 26 October 2026: yes to matching the phone.

Problem

When the 1 Hz stream carries no active EV field (field 10), Now takes the charger's power from /api/loadpoints and puts the car on its own node. withLoadpointEv also subtracted that power from the house load (field 2), on the guess that the box had folded the car into it. The phone stopped guessing on 18 October (srcfl/ftw-app f3ee97a, "preserve Core load when showing charger power"). Since then, Usage on the web could read lower than on the phone for the same home.

Change

  • withLoadpointEv adds the charger's reading and leaves LOAD_W as the box sent it, missing and zero included.
  • Tests:
    • the silent-stream case keeps the 12.7 kW load and still draws the car at 11.4 kW;
    • a missing load stays missing, and a zero load stays zero.

Evidence

  • vitest on src/lib/state and the Now and EV panel tests: 207 passed.
  • svelte-check: 0 errors.
  • The dev simulator always sends field 10, so the overlay never fires there and nothing changes on screen.

🤖 Generated with Claude Code

withLoadpointEv put the car on its node from /api/loadpoints and also
subtracted that power from field 2, guessing that the box had folded the
car into the house. The phone stopped guessing on 18 October (ftw-app
f3ee97a, "preserve Core load when showing charger power"): the overlay
adds the charger's reading and leaves the load as the box sent it,
missing and zero included. Same here, so Usage reads the same on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T04:59:37.513941Z 23c148e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 23c148e Commit Preview URL

Branch Preview URL
Oct 26 2026, 04:59 AM

@frahlg
frahlg merged commit 4d88541 into main Oct 26, 2026
3 checks passed
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