SAFETY-118: read the peak forecast in its own unit
checks / unit (pull_request) Successful in 40m20s
infra-pin / fresh (pull_request) Successful in 1s

peak_forecast_entity is read through pv.watts() by its unit_of_measurement;
the abs(raw) < 50 size rule is gone. No unit or a non-power unit means the
forecast is not used, with one warning per cause. The validator no longer
claims a kW sensor is taken as watts for this entity.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-10-16 16:00:34 +02:00
co-authored by Claude
parent 780c1f67bb
commit f0b4e68e49
11 changed files with 415 additions and 16 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ GROUPS = (
Field("peak_cap_w", SLIDER, "kW", scale=1000, step=100,
simple=True, wizard=5, note="month_peak"),
Field("peak_margin_w", SLIDER, "W", step=10), # SAFETY-79
Field("peak_forecast_entity", ENTITY, kind="power_w", wizard=5),
Field("peak_forecast_entity", ENTITY, kind="power", wizard=5),
Field("peak_soc_floor", LOCKED, "%"),
)),
Part("start", (