Skip to content

Commit

Permalink
fix: hyundai and possible genesis climate control issue
Browse files Browse the repository at this point in the history
#Fixes Hyundai-Kia-Connect/kia_uvo#1002

This commit addresses the climate control issue as described in [Hyundai-Kia-Connect/kia_uvo#1002](Hyundai-Kia-Connect/kia_uvo#1002). The payload for the remote climate control has been updated to include both climate settings and seat heater/vent commands.
  • Loading branch information
Shereef committed Jan 6, 2025
1 parent 3a672ef commit d1f9f31
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions hyundai_kia_connect_api/KiaUvoApiCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class KiaUvoApiCA(ApiImpl):
def __init__(self, region: int, brand: int, language: str) -> None:
self.vehicle_timezone = self.data_timezone
self.LANGUAGE: str = language
self.brand = brand
if BRANDS[brand] == BRAND_KIA:
self.BASE_URL: str = "kiaconnect.ca"
elif BRANDS[brand] == BRAND_HYUNDAI:
Expand Down Expand Up @@ -582,25 +583,31 @@ def start_climate(
)
if vehicle.engine_type == ENGINE_TYPES.EV:
payload = {
"remoteControl": {
"airCtrl": int(options.climate),
"defrost": options.defrost,
"heating1": options.heating,
"airTemp": {
"value": hex_set_temp,
"unit": 0,
"hvacTempType": 1,
},
"pin": token.pin,
}
climate_settings = {
"airCtrl": int(options.climate),
"defrost": options.defrost,
"heating1": options.heating,
"airTemp": {
"value": hex_set_temp,
"unit": 0,
"hvacTempType": 1,
}
}
if BRANDS[self.brand] == BRAND_KIA:
payload["remoteControl"] = climate_settings
payload["remoteControl"].update({
"igniOnDuration": options.duration,
"seatHeaterVentCMD": {
"drvSeatOptCmd": options.front_left_seat,
"astSeatOptCmd": options.front_right_seat,
"rlSeatOptCmd": options.rear_left_seat,
"rrSeatOptCmd": options.rear_right_seat,
},
},
"pin": token.pin,
}
})
else:
payload["hvacInfo"] = climate_settings
else:
payload = {
"setting": {
Expand Down

0 comments on commit d1f9f31

Please sign in to comment.