Skip to content

Commit

Permalink
fix: USA KIA Corrected Evstatus error (Hyundai-Kia-Connect#190)
Browse files Browse the repository at this point in the history
* fix: USA KIA Corrected Evstatus error

Hyundai-Kia-Connect#189

* fix: black action

Co-authored-by: cdnninja <cdnninja@users.noreply.github.com>
  • Loading branch information
cdnninja and cdnninja authored Dec 1, 2021
1 parent b3031b5 commit 7f7b976
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/kia_uvo/KiaUvoAPIUSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,10 @@ def get_cached_vehicle_status(self, token: Token):
"batSoc": vehicle_status["batteryStatus"]["stateOfCharge"],
}

vehicle_status["evStatus"]["remainTime2"] = {
"atc": vehicle_status["evStatus"]["remainChargeTime"][0]["timeInterval"]
}
if vehicle_status.get("evStatus"):
vehicle_status["evStatus"]["remainTime2"] = {
"atc": vehicle_status["evStatus"]["remainChargeTime"][0]["timeInterval"]
}

vehicle_status["doorOpen"] = vehicle_status["doorStatus"]
vehicle_status["trunkOpen"] = vehicle_status["doorStatus"]["trunk"]
Expand Down

0 comments on commit 7f7b976

Please sign in to comment.