EV-20: Car Solar mode, spare sun to the car (charging only)
Solar as a second writer next to Manual (carmode.SolarPlan, SolarWriter on ManualWriter's one write site, safe phase sequence and other-writer watch): signed spare, Batteries first on the batteries' ratings, the margin, whole amps rounded down, the 30 s / 1 A rule, start and pause dwells, auto phases, a one-phase car. Every way out ends at 0 A, retried by EV-04's rule; at shutdown before the inverters, three tries inside 15 s (D3); start-up and a returning charger or HA write 0 A first (D2); never over another writer's hold. The peak guard treats a Solar car as a Manual car (D1 wording). Solar kWh sensor and card line; select.goodwe_car_sun_first; ev_margin_w, ev_start_min, ev_pause_min with config, validator, translations, DOCS, DECISIONS and CHANGELOG. Checks: test_ev20.py, test_ev20_exits.py, test_ev20_writers.py, test_ev20_guard.py, test_ev20_long.py, test_ev20_long_car.py, test_ev20_fuzz.py (harness tools/ev20_sun.py, ev20_kit.py, ev20_day.py); test_ev03/test_ev04 no longer use Solar as the refused example. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
@@ -160,8 +160,9 @@
|
||||
$("#car-why").textContent = c.why;
|
||||
renderCarControls(c);
|
||||
}
|
||||
// EV-04: Off and Manual. The mode and the phases send at once; the current
|
||||
// sends after two seconds of rest. A slider being dragged is left alone.
|
||||
// EV-04: Off and Manual; EV-20: Solar and where its spare sun goes first.
|
||||
// The mode, the phases and the choice send at once; the current sends after
|
||||
// two seconds of rest. A slider being dragged is left alone.
|
||||
let carTouch = 0, carTimer = null, carBusy = false;
|
||||
async function carAct(what, value) {
|
||||
if (carBusy) return;
|
||||
@@ -182,6 +183,13 @@
|
||||
type: "button", role: "radio", "aria-checked": String(c.mode === m),
|
||||
onclick: () => carAct("car_mode", m) }, t("car.mode_" + m))));
|
||||
$("#car-help").textContent = t("car.help_" + c.mode + ".description") || "";
|
||||
const sol = c.mode === "solar" && !!c.first;
|
||||
$("#car-solar").hidden = !sol;
|
||||
if (sol) {
|
||||
$("#car-first").replaceChildren(...c.first.choices.map((f) => h("button", {
|
||||
type: "button", role: "radio", "aria-checked": String(c.first.value === f),
|
||||
onclick: () => carAct("car_sun_first", f) }, t("car.first_" + f))));
|
||||
}
|
||||
const on = c.mode === "manual" && !!c.current;
|
||||
$("#car-manual").hidden = !on;
|
||||
if (!on) return;
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
<div class="small car-lab" data-t="car.phases"></div>
|
||||
<div class="seg" role="radiogroup" id="car-phases" data-t-label="car.phases"></div>
|
||||
</div>
|
||||
<div id="car-solar" hidden>
|
||||
<div class="small car-lab" data-t="car.first"></div>
|
||||
<div class="seg" role="radiogroup" id="car-first" data-t-label="car.first"></div>
|
||||
<p class="tiny muted" style="margin:6px 0 0" data-t="car.first_help.description"></p>
|
||||
</div>
|
||||
<div class="car-why small"><span class="muted" data-t="car.why"></span><span id="car-why"></span></div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user