TARIFF-30: hold out a failed leg while the trade winds down; docs, text, pins
checks / unit (pull_request) Failing after 58m14s
infra-pin / fresh (pull_request) Successful in 2s

The loop gives up a trade's last target at its slew, so a unit whose own leg failed stays at 0 W charge for that tail (120 s at most). Option and status texts follow STYLE.md. DOCS and CHANGELOG. The per-entry schema pins in test_inverter and test_translations count the new key.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude (dev)
2026-12-05 17:11:07 +01:00
parent 6881748660
commit 9ba3008eb8
11 changed files with 37 additions and 20 deletions
+1 -1
View File
@@ -105,7 +105,7 @@
"toast": {"started": "Control started.", "stopped": "Control stopped.", "done": "Done.", "failed": "That did not work. Try again."},
"offline": {"name": "Cannot reach the add-on", "description": "The page tries again every 3 seconds."},
"setup_only": {"name": "Setup: nothing is controlled yet", "description": "Nothing is sent to any inverter until setup is saved and the add-on restarts.", "control": "Control starts after setup.", "open": "Open Setup"},
"batteries": {"name": "Batteries", "description": "To choose a mode for each battery, turn on battery modes in the settings.", "level": "Level", "now": "Now", "stored": "Stored", "round_trip": "Round trip", "round_trip_unset": "not set", "mode": "Mode", "settings": "Change inverter settings",
"batteries": {"name": "Batteries", "description": "To choose a mode for each battery, turn on battery modes in the settings.", "level": "Level", "now": "Now", "stored": "Stored", "round_trip": "Efficiency", "round_trip_unset": "not set", "mode": "Mode", "settings": "Change inverter settings",
"on": "On", "off": "Off",
"choice": {
"solar_first": {"name": "Solar first", "description": "Charges from solar before the other batteries, covers the house and never charges from the grid."},
+1 -1
View File
@@ -102,7 +102,7 @@
"toast": {"started": "Regeling gestart.", "stopped": "Regeling gestopt.", "done": "Klaar.", "failed": "Dat lukte niet. Probeer opnieuw."},
"offline": {"name": "Add-on niet bereikbaar", "description": "De pagina probeert het elke 3 seconden opnieuw."},
"setup_only": {"name": "Installatie: nog niets wordt geregeld", "description": "Er gaat niets naar een omvormer tot de installatie bewaard is en de add-on herstart.", "control": "De regeling start na de installatie.", "open": "Installatie openen"},
"batteries": {"name": "Batterijen", "description": "Zet batterijmodi aan in de instellingen om per batterij een modus te kiezen.", "level": "Laadniveau", "now": "Nu", "stored": "Opgeslagen", "round_trip": "Rendement heen en terug", "round_trip_unset": "niet ingesteld", "mode": "Modus", "settings": "Instellingen van omvormers wijzigen",
"batteries": {"name": "Batterijen", "description": "Zet batterijmodi aan in de instellingen om per batterij een modus te kiezen.", "level": "Laadniveau", "now": "Nu", "stored": "Opgeslagen", "round_trip": "Rendement", "round_trip_unset": "niet ingesteld", "mode": "Modus", "settings": "Instellingen van omvormers wijzigen",
"on": "Aan", "off": "Uit",
"choice": {
"solar_first": {"name": "Eerst zonne-energie", "description": "Laadt met zonne-energie vóór de andere batterijen, dekt het huis en laadt nooit van het net."},
+3 -2
View File
@@ -93,8 +93,9 @@ ROSTER_FIELDS = (
Field("inverters.capacity_kwh", NUMBER, "kWh", step=0.1, show=_LISTED,
wizard=2),
# TARIFF-30: optional, 0.5 to 1; not shown for the flat single inverter
# (it stores no per-unit keys) and not in the setup wizard.
Field("inverters.round_trip_eff", NUMBER, step=0.01, show=_LISTED),
# (it stores no per-unit keys).
Field("inverters.round_trip_eff", NUMBER, step=0.01, show=_LISTED,
wizard=2),
)
GROUPS = (