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(USA): Hyundai EV Start Stop #429

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
SEAT_STATUS,
DISTANCE_UNITS,
TEMPERATURE_UNITS,
ENGINE_TYPES,
)
from .utils import get_child_value
from .ApiImpl import ApiImpl, ClimateRequestOptions
Expand Down Expand Up @@ -508,8 +509,10 @@ def start_climate(
self, token: Token, vehicle: Vehicle, options: ClimateRequestOptions
) -> str:
_LOGGER.debug(f"{DOMAIN} - Start engine..")

url = self.API_URL + "rcs/rsc/start"
if vehicle.engine_type == ENGINE_TYPES.EV:
url = self.API_URL + "evc/fatc/start"
else:
url = self.API_URL + "rcs/rsc/start"

headers = self._get_vehicle_headers(token, vehicle)
_LOGGER.debug(f"{DOMAIN} - Start engine headers: {headers}")
Expand Down Expand Up @@ -560,7 +563,10 @@ def start_climate(
def stop_climate(self, token: Token, vehicle: Vehicle) -> None:
_LOGGER.debug(f"{DOMAIN} - Stop engine..")

url = self.API_URL + "rcs/rsc/stop"
if vehicle.engine_type == ENGINE_TYPES.EV:
url = self.API_URL + "evc/fatc/stop"
else:
url = self.API_URL + "rcs/rsc/stop"

headers = self._get_vehicle_headers(token, vehicle)

Expand Down
Loading