Skip to content

Commit

Permalink
feat: EV charging speed in EU and fix for US (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
asychow authored Nov 17, 2024
1 parent 9fb6ff3 commit 07a213c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hyundai_kia_connect_api/HyundaiBlueLinkApiUSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def _update_vehicle_properties(self, vehicle: Vehicle, state: dict) -> None:
vehicle.ev_battery_is_plugged_in = get_child_value(
state, "vehicleStatus.evStatus.batteryPlugin"
)
vehicle.ev_charging_current = get_child_value(
state, "vehicleStatus.evStatus.batteryStndChrgPower"
vehicle.ev_charging_power = get_child_value(
state, "vehicleStatus.evStatus.batteryPower.batteryStndChrgPower"
)
ChargeDict = get_child_value(
state, "vehicleStatus.evStatus.reservChargeInfos.targetSOClist"
Expand Down
5 changes: 5 additions & 0 deletions hyundai_kia_connect_api/KiaUvoApiEU.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,11 @@ def _update_vehicle_properties(self, vehicle: Vehicle, state: dict) -> None:
vehicle.ev_charge_port_door_is_open = True
elif ev_charge_port_door_is_open == 2:
vehicle.ev_charge_port_door_is_open = False

vehicle.ev_charging_power = get_child_value(
state, "vehicleStatus.evStatus.batteryPower.batteryStndChrgPower"
)

if (
get_child_value(
state,
Expand Down
3 changes: 2 additions & 1 deletion hyundai_kia_connect_api/Vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ class Vehicle:
# EV fields (EV/PHEV)

ev_charge_port_door_is_open: typing.Union[bool, None] = None
ev_charging_power: typing.Union[float, None] = None # Charging power in kW

ev_charge_limits_dc: typing.Union[int, None] = None
ev_charge_limits_ac: typing.Union[int, None] = None
ev_charging_current: typing.Union[int, None] = (
None # Only supported in some regions
None # Europe feature only, ac charging current limit
)
ev_v2l_discharge_limit: typing.Union[int, None] = None

Expand Down
2 changes: 2 additions & 0 deletions hyundai_kia_connect_api/bluelink.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def print_vehicle(vehicle):
print(" location_last_updated_at:", vehicle.location_last_updated_at)
print("EV/PHEV")
print(" charge_port_door_is_open:", vehicle.ev_charge_port_door_is_open)
print(" charging_power:", vehicle.ev_charging_power)
print(" charge_limits_dc:", vehicle.ev_charge_limits_dc)
print(" charge_limits_ac:", vehicle.ev_charge_limits_ac)
print(" charging_current:", vehicle.ev_charging_current)
Expand Down Expand Up @@ -278,6 +279,7 @@ def vehicle_to_dict(vehicle):
},
"electric": {
"charge_port_door_is_open": vehicle.ev_charge_port_door_is_open,
"charging_power": vehicle.ev_charging_power,
"charge_limits_dc": vehicle.ev_charge_limits_dc,
"charge_limits_ac": vehicle.ev_charge_limits_ac,
"charging_current": vehicle.ev_charging_current,
Expand Down

0 comments on commit 07a213c

Please sign in to comment.