Skip to content

docs: show car_charging_now per charger, and how to share one charger between cars - #5476

Open
chalfontchubby wants to merge 3 commits into
mainfrom
docs/car-charging-now-per-charger
Open

chalfontchubby wants to merge 3 commits into
mainfrom
docs/car-charging-now-per-charger

Conversation

@chalfontchubby

Copy link
Copy Markdown
Collaborator

Posted by Claude on behalf of @chalfontchubby.

Why

car_charging_now is what makes Predbat hold the house battery while a car is actually drawing power. It also catches a charge someone starts by hand. devices.md only showed it for Hypervolt, PodPoint, Wallbox and the old Ohme HACS integration.

#5467 showed another gap: two cars sharing one Zappi. A single charger sensor listed for both cars reads both as plugged in or charging. car_charging_exclusive then plans car 0 whichever car is actually on the charger. The docs didn't explain how to handle that.

What changes (docs only)

docs/devices.md

  • A short section at the top that:
    • links to the car_charging_now reference;
    • explains that car_charging_now_response and car_charging_planned_response are each one list for every car, so values from a device example should be merged into the user's list, not replace it;
    • points to the shared-charger recipe.
  • Ohme built-in HA integration: car_charging_now from sensor.ohme_{ohme_name}_status, which reads charging, with a note on Ohme Direct.
  • Zappi:
    • adds car_charging_now from the plug status;
    • notes ev ready to charge, which the template's planned-response list lacks;
    • notes that re: picks an unpredictable match when there are several Zappis, and that myenergi_automatic sets these values itself.
  • Fix: the Zappi car_charging_planned example was 're:sensor.myenergi_zappi_[0-9a-z]+_plug_status)'. The stray ) makes it an invalid regular expression (re.error: unbalanced parenthesis), so anyone who copied it got no plug detection.

docs/car-charging.md

  • Adds car_charging_now to the list of per-car settings under Multiple Electric Cars.
  • Adds a new "One charger shared by more than one car" recipe:
    • per-car template sensors gated by an input_select naming the car on the charger, with availability guards and car_charging_exclusive kept on;
    • it says where the recipe doesn't apply: chargers set up by Predbat's own integrations, whose automatic setup and charger control assume one car per charger, and a charger enrolled on its own with Octopus Intelligent.

Tesla has no example: I couldn't confirm an entity name for its integrations.

How to check

Docs only, and pre-commit passes (markdownlint, cspell). I ran several local /code-review high passes and checked the claims against the code:

  • the exclusive loop (fetch.py);
  • the *_response defaults;
  • the 200 W threshold and kW conversion;
  • overwrite=False for a car_charging_now the user has set;
  • ignore_unplugged gating;
  • the dispatch check's treatment of an unavailable sensor.

All anchors used match existing headings.

🤖 Generated with Claude Code

chalfontchubby and others added 3 commits October 10, 2026 17:22
… between cars

car_charging_now is what makes Predbat hold the house battery while a car is
actually drawing power, but devices.md only showed it for some chargers.

devices.md: a short pointer to the car_charging_now reference, a note that
the *_response lists are global (merge, don't replace), and examples for
the Ohme built-in integration and the Zappi. Also fix the Zappi
car_charging_planned regex, whose stray ')' made it an invalid expression
("unbalanced parenthesis").

car-charging.md: under Multiple Electric Cars, a recipe for one charger
shared by two cars (#5467). A single charger sensor listed for both cars
reads both as plugged in or charging, and car_charging_exclusive then plans
car 0 whichever car is on the charger. The recipe gives each car its own
template sensors, gated by an input_select naming the car on the charger,
and states where it does not apply (Predbat's own charger integrations, and
a charger enrolled on its own with Octopus Intelligent).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most inverter templates already list 'ev ready to charge' in
car_charging_planned_response; only the default apps.yaml leaves it out,
so say "make sure your list includes it" rather than "add that one".

With more than one Zappi, car_charging_energy's re: also resolves to a
single session sensor, so tell users to list every Zappi's session
sensor there too (minute_data_import_export sums them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rather than keeping yours

gateway.py writes car_charging_now with set_arg, which overwrites, unlike
the Ohme, myenergi and Wallbox integrations (set_arg_auto with
overwrite=False). The devices.md overview added in this PR links here.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation matches the implemented configuration and charging behavior, with no unresolved issues found.

0 open findings

What changed in this PR

Documents live EV charging detection and shared-charger configuration, addressing the setup gap highlighted by #5467.

Changes:

  • Adds Ohme and Zappi car_charging_now guidance and fixes the Zappi regex.
  • Adds a multi-car shared-charger recipe with guarded template sensors.
File Description
docs/​devices.md Expands charger-specific configuration guidance.
docs/​car-charging.md Documents per-car settings and shared-charger setup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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