Loadpoint: follow charger current (#9408)
This commit is contained in:
parent
57fac97641
commit
8f1929561e
1 changed files with 2 additions and 5 deletions
|
|
@ -656,11 +656,8 @@ func (lp *Loadpoint) syncCharger() error {
|
|||
lp.log.WARN.Printf("charger logic error: current mismatch (got %.3gA, expected %.3gA)", current, lp.chargeCurrent)
|
||||
}
|
||||
|
||||
if charger, ok := lp.charger.(api.ChargerEx); ok {
|
||||
return charger.MaxCurrentMillis(lp.chargeCurrent)
|
||||
}
|
||||
|
||||
return lp.charger.MaxCurrent(int64(lp.chargeCurrent))
|
||||
lp.chargeCurrent = current
|
||||
lp.bus.Publish(evChargeCurrent, lp.chargeCurrent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue