Validate currents
This commit is contained in:
parent
3a467f8492
commit
92b2c36108
1 changed files with 8 additions and 0 deletions
|
|
@ -169,6 +169,14 @@ func NewLoadPointFromConfig(log *util.Logger, cp configProvider, other map[strin
|
|||
}
|
||||
}
|
||||
|
||||
if lp.MinCurrent == 0 {
|
||||
log.WARN.Println("minCurrent must not be zero")
|
||||
}
|
||||
|
||||
if lp.MaxCurrent <= lp.MinCurrent {
|
||||
log.WARN.Println("maxCurrent must be larger than minCurrent")
|
||||
}
|
||||
|
||||
if lp.Meters.ChargeMeterRef != "" {
|
||||
lp.chargeMeter = cp.Meter(lp.Meters.ChargeMeterRef)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue