diff --git a/hyundai_kia_connect_api/KiaUvoApiCA.py b/hyundai_kia_connect_api/KiaUvoApiCA.py index 90345d21..0706b94e 100644 --- a/hyundai_kia_connect_api/KiaUvoApiCA.py +++ b/hyundai_kia_connect_api/KiaUvoApiCA.py @@ -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: @@ -582,15 +583,21 @@ 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, @@ -598,9 +605,9 @@ def start_climate( "rlSeatOptCmd": options.rear_left_seat, "rrSeatOptCmd": options.rear_right_seat, }, - }, - "pin": token.pin, - } + }) + else: + payload["hvacInfo"] = climate_settings else: payload = { "setting": {