Fix decoding mode "off"
This commit is contained in:
parent
ac2b43af9c
commit
ffffa2c2b4
1 changed files with 5 additions and 0 deletions
|
|
@ -110,6 +110,11 @@ func NewLoadPointFromConfig(log *util.Logger, cp configProvider, other map[strin
|
|||
lp := NewLoadPoint()
|
||||
util.DecodeOther(log, other, &lp)
|
||||
|
||||
// workaround mapstructure
|
||||
if lp.Mode == "0" {
|
||||
lp.Mode = api.ModeOff
|
||||
}
|
||||
|
||||
if lp.ChargerRef != "" {
|
||||
lp.charger = cp.Charger(lp.ChargerRef)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue