Update psa_car_controller/psa/RemoteClient.py

Co-authored-by: Florian BEZANNIER <48728684+flobz@users.noreply.github.com>
This commit is contained in:
SharkEzz
2022-09-05 21:37:30 +02:00
committed by GitHub
co-authored by Florian BEZANNIER
parent e3399b4327
commit d288a9acc9
+1 -1
View File
@@ -89,7 +89,7 @@ class RemoteClient:
logger.exception("on_mqtt_message:")
def _fix_not_updated_api(self, charge_info, vin):
if charge_info is not None and charge_info.get('remaining_time', 0) != 0 and charge_info.get('rate', 0) != 0:
if charge_info is not None and (charge_info.get('remaining_time', 0) != 0 or charge_info.get('rate', 0) != 0):
try:
car = self.vehicles_list.get_car_by_vin(vin=vin)
if car and car.status.get_energy('Electric').charging.status != INPROGRESS: