EV-05 round 5: headroom counts only the batteries that can give
checks / unit (pull_request) Successful in 24m24s
infra-pin / fresh (pull_request) Successful in 2s

Review of 8818768: the headroom test compared the output with the site
rating, which still counted a battery refusing to give (SAFETY-73) or under
a safety stop, so the 15 s wait ran at the real maximum (N4). Now only the
units that can give (above their cut-out, not refusing, not stopped,
switched on) count, in what they give and in their ratings.

Tests: R5a (A refuses, B at full rating, against a car-Off twin: the cut at
910, period 3361 W), R5b (headroom and a slow battery: the cut at exactly
15 s), R5c (floor-limited alone decides: cut at once). DOCS wrapped to 79.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ems-agent
2026-11-18 17:27:17 +01:00
co-authored by Claude
parent 8818768dab
commit 69f58181bc
5 changed files with 164 additions and 46 deletions
+30 -30
View File
@@ -3327,14 +3327,14 @@ checks within 10 seconds that the charger took it.
current again only if the charger shows a different one.
- Off writes nothing, ever.
**Solar mode.** Choose *Solar* on Home (or `Solar` on `select.goodwe_car_mode`)
and where spare sun goes first: **Batteries** or **Car** (`select.goodwe_car_sun_first`).
Both apply at once, with no restart.
**Solar mode.** Choose *Solar* on Home (or `Solar` on
`select.goodwe_car_mode`) and where spare sun goes first: **Batteries** or
**Car** (`select.goodwe_car_sun_first`). Both apply at once, with no restart.
- *Spare sun* is solar production less the house, measured without a solar
sensor: the car's power, plus what the batteries charge, less what the grid
gives. A grid charge of the batteries, or batteries giving more than the house
uses, is never spare sun.
gives. A grid charge of the batteries, or batteries giving more than the
house uses, is never spare sun.
- *Batteries first*: the car gets what is left after the full rating of every
battery that may still charge (switched on, not refusing, not full), less
*Sun kept back*. So the car gets sun only when the batteries charge at full
@@ -3354,18 +3354,18 @@ Both apply at once, with no restart.
taken off the car first, down to 0 A if needed. While the batteries can
still raise their output, the add-on first waits 15 seconds, so a cloud
the batteries catch does not pause the car. It cuts at once when they
cannot: already at full power, at the peak reserve or at their cut-out
level. It also cuts at once in the last 2 minutes of the 15-minute period. A Solar
charge never sets the month's peak.
cannot: already at full power, at the peak reserve, at their cut-out
level or refusing to give. It also cuts at once in the last 2 minutes of
the 15-minute period. A Solar charge never sets the month's peak.
- **Every way out of Solar leaves the charger at 0 A**: a stop or
restart of the add-on (before the inverters go to 0 W), stopping control, a
safety stop, shadow mode turned on, choosing Off, an unplugged car, a charger
error or a stuck reading. If the charger does not take the 0 A, the add-on
tries again a minute later, three times, then shows *Charger did not take
it* and a warning. Once taken, nothing more is written. After the charger
or Home Assistant was away, the
add-on first sets 0 A, then starts again by the rules. A meter that stops
gives a hold for *Pause after*, then 0 A. Choosing Manual leaves it to Manual.
or Home Assistant was away, the add-on first sets 0 A, then starts again
by the rules. A meter that stops gives a hold for *Pause after*, then 0 A.
Choosing Manual leaves it to Manual.
- Another writer stops the add-on's writes after 30 seconds, with an amber row
and a warning, until you press the mode again or the charger shows the
add-on's value again.
@@ -3373,24 +3373,23 @@ Both apply at once, with no restart.
`sensor.goodwe_car_today_solar_kwh`. Only the sun the car could take counts,
not the battery or grid share of a hold, and not Manual.
**The car is never slowed for the peak limit in Manual.** A Manual charge goes on whatever
the 15-minute peak does. With the default `ev_batt_cover` on, the batteries help
cover it down to the peak reserve; a 3-phase 16 A charge (11 kW) can empty two
batteries to the reserve in about 1.5 hours, and the month's peak then rises by
what the car drew. When the car alone is why the batteries cannot hold the
period, the add-on does **not** raise *Battery stopped limiting the peak* or
*Load too high for battery*. It shows a grey note *Car over the peak
**The car is never slowed for the peak limit in Manual.** A Manual charge goes
on whatever the 15-minute peak does. With the default `ev_batt_cover` on, the
batteries help cover it down to the peak reserve; a 3-phase 16 A charge (11 kW)
can empty two batteries to the reserve in about 1.5 hours, and the month's peak
then rises by what the car drew. When the car alone is why the batteries cannot
hold the period, the add-on does **not** raise *Battery stopped limiting the
peak* or *Load too high for battery*. It shows a grey note *Car over the peak
limit* once per charging session, a grey row, and says so in the car's *Why*.
This holds only while the car's reading is fresh and the charger's energy
meter confirms it (the meter must have gained at least half of what the power
adds up to over the last minute). A stale, stuck or frozen reading, or a
charger with no energy entity, never hides a real overload of the house: the
normal alarms stand. With `ev_batt_cover` off, the peak
guard protects the house without the car, so it does not spend the batteries on
it. Normal zero-grid control can still discharge them for the car, and a grid
charge of the batteries can bring the period to the peak limit plus the car.
The period can go over by the car alone. When the month's peak was set by a car
charge, Home's peak line says so.
This holds only while the car's reading is fresh and the charger's energy meter
confirms it (the meter must have gained at least half of what the power adds up
to over the last minute). A stale, stuck or frozen reading, or a charger with
no energy entity, never hides a real overload of the house: the normal alarms
stand. With `ev_batt_cover` off, the peak guard protects the house without the
car, so it does not spend the batteries on it. Normal zero-grid control can
still discharge them for the car, and a grid charge of the batteries can bring
the period to the peak limit plus the car. The period can go over by the car
alone. When the month's peak was set by a car charge, Home's peak line says so.
**When the charger does not answer.** After 30 seconds the card says *Charger
not reachable* and one amber row appears. After 5 minutes one notification
@@ -3432,8 +3431,9 @@ automation on.
**Home Assistant entities.** With MQTT the add-on adds the sensors
`goodwe_car_power`, `goodwe_car_state`, `goodwe_car_today_kwh` and
`goodwe_car_today_solar_kwh`, and the four controls named above. A saved ("retained") command is never applied, so a
restart of Home Assistant cannot change the charger.
`goodwe_car_today_solar_kwh`, and the four controls named above. A saved
("retained") command is never applied, so a restart of Home Assistant cannot
change the charger.
### Site