From 7132d3005d00173e1e46fde94712e2a38d980e77 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 26 Apr 2021 08:28:16 +0200 Subject: [PATCH] Re-add deprecated soc levels --- core/loadpoint.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/loadpoint.go b/core/loadpoint.go index 08b57e1d3..5ad6cc2b6 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -44,6 +44,7 @@ type SoCConfig struct { Estimate bool `mapstructure:"estimate"` Min int `mapstructure:"min"` // Default minimum SoC, guarded by mutex Target int `mapstructure:"target"` // Default target SoC, guarded by mutex + Levels []int `mapstructure:"levels"` // deprecated } // Poll modes @@ -158,6 +159,10 @@ func NewLoadPointFromConfig(log *util.Logger, cp configProvider, other map[strin } } + if len(lp.SoC.Levels) > 0 { + log.WARN.Printf("soc.levels are deprecated and will be removed in an upcoming release") + } + if lp.SoC.Target == 0 { lp.SoC.Target = lp.OnDisconnect.TargetSoC // use disconnect value as default soc if lp.SoC.Target == 0 {