Re-add deprecated soc levels
This commit is contained in:
parent
e678daba4d
commit
7132d3005d
1 changed files with 5 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue