Skip to content

Commit

Permalink
fix: set charge current (#581)
Browse files Browse the repository at this point in the history
Clarified in the doc that it's Europe only (same as other functions) and
added the function to the VehicleManager (needed for setting the value)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jrnk and pre-commit-ci[bot] authored Jun 27, 2024
1 parent fdc08fc commit 08242d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hyundai_kia_connect_api/ApiImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ def set_charge_limits(
pass

def set_charging_current(self, token: Token, vehicle: Vehicle, level: int) -> str:
"""Sets charge current level (1=100%, 2=90%, 3=60%). Returns the tracking ID"""
"""
Europe feature only.
Sets charge current level (1=100%, 2=90%, 3=60%). Returns the tracking ID
"""
pass

def set_windows_state(
Expand Down
5 changes: 5 additions & 0 deletions hyundai_kia_connect_api/VehicleManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ def set_charge_limits(self, vehicle_id: str, ac: int, dc: int) -> str:
self.token, self.get_vehicle(vehicle_id), ac, dc
)

def set_charging_current(self, vehicle_id: str, level: int) -> str:
return self.api.set_charging_current(
self.token, self.get_vehicle(vehicle_id), level
)

def set_windows_state(self, vehicle_id: str, options: WindowRequestOptions) -> str:
return self.api.set_windows_state(
self.token, self.get_vehicle(vehicle_id), options
Expand Down

0 comments on commit 08242d6

Please sign in to comment.