From fba4cb48034d86132e6a2be4137777b855136647 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 31 Dec 2025 13:20:57 +0100 Subject: [PATCH] Planner: fix backwards compatibility --- core/loadpoint.go | 2 +- core/loadpoint/config.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 207befe21..201205938 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -184,7 +184,7 @@ type Loadpoint struct { func NewLoadpointFromConfig(log *util.Logger, settings settings.Settings, other map[string]any) (*Loadpoint, error) { lp := NewLoadpoint(log, settings) if err := util.DecodeOther(other, lp); err != nil { - return nil, err + return lp, err } // set vehicle polling mode diff --git a/core/loadpoint/config.go b/core/loadpoint/config.go index 86e326f46..8a307e460 100644 --- a/core/loadpoint/config.go +++ b/core/loadpoint/config.go @@ -27,6 +27,7 @@ type DynamicConfig struct { SmartFeedInPriorityLimit *float64 `json:"smartFeedInPriorityLimit"` PlanEnergy float64 `json:"planEnergy"` PlanTime time.Time `json:"planTime"` + PlanPrecondition_ int64 `json:"planPrecondition" mapstructure:"planPrecondition"` // TODO deprecated, keep for compatibility LimitEnergy float64 `json:"limitEnergy"` LimitSoc int `json:"limitSoc"`