Two checks a mutant survived: crediting the car-made export in the done part,
and taking off the car's quarter average instead of its power now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The period without the car was clipped at 0 W, so batteries covering the car
were charged to the house and the floor alarm fired (rig F-1). New
car_exclude_alarm keeps the sign of the rest of the period; car_exclude (the
cover-off guard input) is unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
EV-10: the car is the cause when the period without it (projected minus the car's
fresh, corroborated average) is at or under the aim, also with the projection
still under it. EV-11: car_over stays on until the test has been false for 180 s.
EV-12: the tracker's own-write mute opens before the write and runs 15 s from its
return.
Co-Authored-By: Claude <noreply@anthropic.com>
N1 the undo gives the old current back (clamped) in shadow mode; DECISIONS records it as the one write shadow mode allows.
N2 the corroboration looks back to a stretch with at least 40 Wh expected (60 s at 2.4 kW and up, 104 s at 1.38 kW).
L4 the current comes back 10 s after the phase select returned, also when it was refused.
Co-Authored-By: Claude <noreply@anthropic.com>
M1 the writer ignores a reading taken before its latest confirmed write.
M2 a refused phase select gives the current back and stops after 3 tries (amber row).
M3 Off, shadow mode or a control/safety stop before the select undoes the change.
M4 the restore on shutdown (and the undo) is clamped.
M5 the car's power reaches the alarm path only while the charger's energy meter agrees with it.
L1 fuzz other-writer branch reachable and shown to run. L2 one wording. L3 Batteries-help-off text.
Co-Authored-By: Claude <noreply@anthropic.com>
Off and Manual (runtime state, Home and Home Assistant): the current (6 A to
the clamp) and the phases (1 or 3) are written once per user change through
the safe phase sequence, read back within 10 s, clamped to
min(ev_max_a, station limit, entity range). Shadow mode gates the writes.
The car's fresh power goes to the peak guard's alarm path: no false "Load too
high" or "Battery stopped limiting the peak", one grey notice per session.
ev_batt_cover and ev_mode_start options, peak line "set by the car", HA
entities, sim writes, DOCS, CHANGELOG, test_ev04.py.
Co-Authored-By: Claude <noreply@anthropic.com>
- MAINT-28: say the hold is for two inverters (the code gates it on N >= 2).
- EV-03: "no longer buy energy for the car" (the profile is a 7-day median).
- TEL-19: plain wording for the PV sensor point.
- Known issues: add TEL-20 (DOCS names a car sensor id HA does not create).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump version to 0.23.0 and fold "Not in a release yet" into a new
0.23.0 CHANGELOG section (MAINT-28, CI-17, EV-03, CI-18). Four new
options (ev_*), all with defaults; no option change needed.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
The selector reads the graph, and run-affected.sh runs the tests, from the
working tree, so a --base/--head range is only right with the head checked
out. The CI image is built from the merged tree, so an ENV CI_ONLY in its
Dockerfile would make the gate partial; test_affected_tests.py now fails on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test first reached as text (a pattern reader) was never expanded again when a
later path reached it by import, so a test importing it was missed. Expanded and
reached are now tracked apart; the empty diff selects the safety set. Test added.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
- .gitea/ci/affected_tests.py: which test_*.py a diff reaches (static import
graph plus names in strings, transitive), a fixed safety set, SELECT ALL for
anything it cannot map. .gitea/ci/run-affected.sh runs the selection in the
CI image. run-tests.sh takes CI_ONLY for that; checks.yml never sets it and
test_affected_tests.py fails if it does. The merge gate still runs every file.
- test_modes_p4 -> p4/p4b/p4c/p4d, test_safety126 -> +b, test_safety125 -> +b:
same check lines, none dropped (146, 35, 45 before and after).
- run-tests.sh: 10 workers instead of 6, new longest-first order.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
POWER_UNITS is now derived from _W_PER, so the start-up probe and the
reading cannot drift apart. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- every HA power unit is accepted and converted (mW, W, kW, MW), in the probe
and in the reading
- a power entity that answers in another unit, with no unit, or not as a
number makes the reading unavailable: after 30 s it is "Charger not
reachable" (amber row, WARNING, notification after 5 min), with a Why that
names the cause (EN and NL)
Co-Authored-By: Claude <noreply@anthropic.com>
A charger with no usable power entity is refused as "not set up", like a
missing setpoint, read-back or state entity, so House and the house profile
behave as with no charger. An entity that is merely unavailable at probe time
is still the unreachable path. NL: help text "met rust", chip "Laadpaalstoring".
Co-Authored-By: Claude <noreply@anthropic.com>
- CarTracker.car_w returns None when the current reading carries no power
(power entity unavailable or in a non-power unit); it can no longer raise
into the control cycle, /status or the MQTT values.
- mode3 E and F are the card state "fault" (EN and NL).
- chargersim gains fault().
Co-Authored-By: Claude <noreply@anthropic.com>
test_pv.py part 6 says only the PV reader's named modules may mention its
material, so chargers.py no longer imports pv.py.
Co-Authored-By: Claude <noreply@anthropic.com>
Read-only: nothing in this change writes to the charger.
- app/chargers.py: ChargerDriver, AlfenHaDriver, UnavailableCharger, ChargerReading, CarTracker
- options ev_charger/ev_current_entity/ev_max_a/ev_phases (default off), Settings group, validator, census
- Car card on Home, unreachable row and notification, two-writer info row, MQTT sensors
- car out of the House tile and the house profile
- tools/chargersim.py charger model, test_ev03.py
Co-Authored-By: Claude <noreply@anthropic.com>
The two fixtures ran their cycles at _SRC_NOW but set rejected_since from the
real clock, so the cycle saw inverter-b live while live_units() saw it stale.
Both now use _SRC_NOW, and a check asserts both clocks agree. run_cycle's
comment no longer claims ctl_cycle.py:49 is the only clock read.
Co-Authored-By: Claude <noreply@anthropic.com>
c_src's telegrams were laid up to one datetime.now(); each cycle() then read
the real clock again (ctl_cycle.py:49). Under --cpus 0.25 a cycle takes ~1.3 s,
so by the 23rd sweep cycle the last telegram was older than max_hold_s (30 s),
the guard counted the gap and filed peak@site. The cycles now run AT the
fixture's own instant. Test only; the exact-set checks are unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
H-1: one site limit while the pause holds (the period's largest floor, never under this cycle's), so the other pack no longer gives for the house. New live-try test (A 11 %, B 25 %, 90 min at 6.5 kW) red on 07d23d2. M-1: a 45-min rig-shape test that goes red when the settled check is forced True. M-2/L-2: DECISIONS. CHANGELOG line. test_safety84 n2_charge_banked re-pinned (quarters 3349 and 3950 W, aim 3950 W).
Co-Authored-By: Claude <noreply@anthropic.com>
The same diff as f3f9483..07d23d2 (cap, settled rule, tests, DECISIONS). The merge took the release/1.0 tree, so the rounds are applied as one patch on top of the restored #247.
Co-Authored-By: Claude <noreply@anthropic.com>
Restores #247's code on this branch after the release/1.0 merge. The fix rounds follow in the next commit.
Co-Authored-By: Claude <noreply@anthropic.com>
- SAFETY-136 row: the gain is at 10 s late; at 15 s a rig test sent more.
- SAFETY-111: the cycle needs more than 4 nights; the 36 h limit ends it.
- MAINT-28: rig counts were 393-468 flips per 45 min, not one figure.
- MAINT-26 / MAINT-25: the next try is the first start hour after the wait.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes PR #247 (f3f9483) out of release/1.0 so the 19 Nov release ships
MAINT-24 + MAINT-25 without MAINT-28. The rig failed f3f9483
(reports/MAINT-28-test-report.md) and the fix-forward PR #248 review found
a High regression (reports/MAINT-28-fix-review-report.md). MAINT-28
continues on PR #248 after the release.
Co-Authored-By: Claude <noreply@anthropic.com>
homeview.maintenance_runs() ignored backoff_until(); it drew a cycle every
night of the wait. Now no run and a plain line (EN, NL). test_maint25.py.
Co-Authored-By: Claude <noreply@anthropic.com>
The mode trade still lets a SAFETY-73 probe (PROBE_W alone) go on while a pack
is in its maintenance CHARGE phase; test_opt20.py g7 pins it. ch_ch_maint
digest moved (B no longer grid-charges beside A's charge).
Co-Authored-By: Claude <noreply@anthropic.com>