Planner: fix backwards compatibility

This commit is contained in:
andig 2025-12-31 13:20:57 +01:00
parent dc6d056538
commit fba4cb4803
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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"`