Loadpoint: ignore charge currents not available (#16477)

This commit is contained in:
andig 2024-10-03 16:43:40 +02:00 • committed by GitHub
parent c964eb2951
commit b7ae44635c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1402,6 +1402,9 @@ func (lp *Loadpoint) UpdateChargePowerAndCurrents() float64 {
if err := backoff.Retry(func() error {
i1, i2, i3, err := phaseMeter.Currents()
if err != nil {
if errors.Is(err, api.ErrNotAvailable) {
err = backoff.Permanent(err)
}
return err
}
@ -1413,7 +1416,7 @@ func (lp *Loadpoint) UpdateChargePowerAndCurrents() float64 {
lp.publish(keys.ChargeCurrents, lp.chargeCurrents)
return nil
}, bo()); err != nil {
}, bo()); err != nil && !errors.Is(err, api.ErrNotAvailable) {
lp.log.ERROR.Printf("charge currents: %v", err)
}
}