From 9f51152c6133ee897de52956bd6602e9fa2f63f9 Mon Sep 17 00:00:00 2001 From: andig Date: Sat, 15 May 2021 14:29:35 +0200 Subject: [PATCH] Ignore must retry errors --- core/soc/socestimator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/soc/socestimator.go b/core/soc/socestimator.go index c251f0b4d..5fdd04fec 100644 --- a/core/soc/socestimator.go +++ b/core/soc/socestimator.go @@ -93,6 +93,10 @@ func (s *Estimator) RemainingChargeEnergy(targetSoC int) float64 { func (s *Estimator) SoC(chargedEnergy float64) (float64, error) { f, err := s.vehicle.SoC() if err != nil { + if errors.Is(err, api.ErrMustRetry) { + return 0, err + } + s.log.WARN.Printf("updating soc failed: %v", err) // try to recover from temporary vehicle-api errors