From 26bf54b8abea82b5cf83d97fbc7bc2b1042354cb Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 15 Mar 2026 17:15:23 +0100 Subject: [PATCH] Optimizer: return infeasable error --- core/site_optimizer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/site_optimizer.go b/core/site_optimizer.go index 275fea66c..96cfa6b02 100644 --- a/core/site_optimizer.go +++ b/core/site_optimizer.go @@ -239,6 +239,10 @@ func (site *Site) optimizerUpdate(battery []types.Measurement) error { return apiError(resp) } + if resp.JSON200.Status != optimizer.Optimal { + return errors.New(string(resp.JSON200.Status)) + } + site.publish("evopt", struct { Req optimizer.OptimizationInput `json:"req"` Res optimizer.OptimizationResult `json:"res"`