From f1a660881c04d2a66136a51f4e86be0ae9ffaddd Mon Sep 17 00:00:00 2001 From: glenn schrooyen Date: Sun, 27 Sep 2026 11:03:30 +0200 Subject: [PATCH] UX-10: two INFO lines read better on TEST-23 (hours count, maintenance history) "11 of 48 hours use yesterday's prices", and the maintenance-history line no longer says "maintenance history" twice. Co-Authored-By: Claude Opus 5.5 --- goodwe_controller/app/price_forecast.py | 4 ++-- goodwe_controller/app/store.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/goodwe_controller/app/price_forecast.py b/goodwe_controller/app/price_forecast.py index 830576f..1fc65f9 100644 --- a/goodwe_controller/app/price_forecast.py +++ b/goodwe_controller/app/price_forecast.py @@ -433,9 +433,9 @@ def fill_from_yesterday(read: PriceRead, *, yesterday: PriceRead, # hours" about a 48-hour horizon. The fill's unit is the HOUR and the # feed's is the POINT; nothing derived from one answers for the other. total_h = len({_utc_hour(p.start) for p in out}) - _LOG.info("%s of %d use yesterday's prices, marked as estimated. " + _LOG.info("%d of %s use yesterday's prices, marked as estimated. " "The feed published %s over the other %s.", - messages.count(carried, "hour"), total_h, + carried, messages.count(total_h, "hour"), messages.count(len(out) - carried, "price"), messages.count(total_h - carried, "hour")) diff --git a/goodwe_controller/app/store.py b/goodwe_controller/app/store.py index ddc4f05..22cfd7b 100644 --- a/goodwe_controller/app/store.py +++ b/goodwe_controller/app/store.py @@ -547,13 +547,12 @@ def migrate_maint_keys(store, unit: str, roster) -> MigrationReport: names = [str(n) for n in roster] rep.from_version = int(data.get(MAINT_SCHEMA_KEY, 0) or 0) if len(names) <= 1: - rep.skipped = ("one inverter, so its maintenance history is read " - "where it is and nothing moves") + rep.skipped = ("one inverter, so it is read where it is and nothing " + "moves") return rep if rep.from_version >= MAINT_SCHEMA_VERSION: - rep.skipped = (f"maintenance history already at version " - f"{rep.from_version}, written for several inverters, so " - f"it is left as it is") + rep.skipped = (f"already at version {rep.from_version}, written for " + f"several inverters, so it is left as it is") return rep rep.ran = True