diff --git a/core/wrapper/socestimator.go b/core/wrapper/socestimator.go index fec10d07f..1261211b3 100644 --- a/core/wrapper/socestimator.go +++ b/core/wrapper/socestimator.go @@ -57,7 +57,7 @@ func (s *SocEstimator) RemainingChargeDuration(chargePower float64, targetSoC in if vr, ok := s.vehicle.(api.ChargeRemainder); ok { timeRemaining, err := vr.RemainingTime() if err == nil { - return timeRemaining * time.Duration(percentRemaining/(100-s.socCharge)) + return time.Duration(float64(timeRemaining) * percentRemaining / (100 - s.socCharge)) } s.log.WARN.Printf("updating remaining time failed: %v", err)