Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CA): Genesis Location #597

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
10 changes: 7 additions & 3 deletions hyundai_kia_connect_api/KiaUvoApiCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ def _update_vehicle_properties_service(self, vehicle: Vehicle, state: dict) -> N
def _update_vehicle_properties_location(
self, vehicle: Vehicle, state: dict
) -> None:
if get_child_value(state, "coord.lat"):
if get_child_value(state, "gpsDetail.coord.lat"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this break other brands within Canada?

self.vehicle_timezone = vehicle.timezone
vehicle.location = (
get_child_value(state, "coord.lat"),
get_child_value(state, "coord.lon"),
get_child_value(state, "gpsDetail.coord.lat"),
get_child_value(state, "gpsDetail.coord.lon"),
parse_datetime(get_child_value(state, "time"), self.data_timezone),
)
vehicle.data["vehicleLocation"] = state
Expand Down Expand Up @@ -480,6 +480,10 @@ def get_location(self, token: Token, vehicle: Vehicle) -> dict:
headers = self.API_HEADERS
headers["accessToken"] = token.access_token
headers["vehicleId"] = vehicle.id

if vehicle.model == "GV60":
url = self.API_URL + "evc/fme"

try:
headers["pAuth"] = self._get_pin_token(token, vehicle)

Expand Down
Loading