hyundai-kia-connect-api 3.40.4__py2.py3-none-any.whl → 3.40.6__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -443,7 +443,7 @@ class ApiImplType1(ApiImpl):
443
443
  vehicle.smart_key_battery_warning_is_on = bool(
444
444
  get_child_value(state, "Electronics.FOB.LowBattery")
445
445
  )
446
- if vehicle._ev_estimated_current_charge_duration is None:
446
+ if vehicle._ev_estimated_current_charge_duration is not None:
447
447
  if vehicle._ev_estimated_current_charge_duration == 0:
448
448
  vehicle.ev_battery_is_charging = False
449
449
  elif vehicle._ev_estimated_current_charge_duration > 0:
@@ -952,6 +952,7 @@ class ApiImplType1(ApiImpl):
952
952
  ).json()
953
953
  _LOGGER.debug(f"{DOMAIN} - Window State Action Response: {response}")
954
954
  _check_response_for_errors(response)
955
+ token.device_id = self._get_device_id(self._get_stamp())
955
956
  return response["msgId"]
956
957
 
957
958
  def _get_control_token(self, token: Token) -> Token:
@@ -449,23 +449,39 @@ class KiaUvoApiCA(ApiImpl):
449
449
  headers["vehicleId"] = vehicle.id
450
450
 
451
451
  response = self.sessions.post(url, headers=headers)
452
- response = response.json()
453
- _LOGGER.debug(f"{DOMAIN} - Received get_ev_details response {response}")
454
- tripStats = []
455
- for trip in response["result"]["tripdetails"]:
456
- processedTrip = DailyDrivingStats(
457
- date=dt.datetime.strptime(trip["startdate"], "%Y-%m-%d %H:%M:%S"),
458
- total_consumed=get_child_value(trip, "totalused"),
459
- engine_consumption=get_child_value(trip, "drivetrain"),
460
- climate_consumption=get_child_value(trip, "climate"),
461
- onboard_electronics_consumption=get_child_value(trip, "accessories"),
462
- battery_care_consumption=get_child_value(trip, "batterycare"),
463
- regenerated_energy=get_child_value(trip, "regen"),
464
- distance=get_child_value(trip, "distance"),
465
- distance_unit=vehicle.odometer_unit,
452
+ if response.ok:
453
+ response = response.json()
454
+ _LOGGER.debug(
455
+ f"{DOMAIN} - Received _update_vehicle_properties_trip_details response {response}"
456
+ )
457
+ if "result" in response and "tripdetails" in response["result"]:
458
+ trip_stats = []
459
+ for trip in response["result"]["tripdetails"]:
460
+ processed_trip = DailyDrivingStats(
461
+ date=dt.datetime.strptime(
462
+ trip["startdate"], "%Y-%m-%d %H:%M:%S"
463
+ ),
464
+ total_consumed=get_child_value(trip, "totalused"),
465
+ engine_consumption=get_child_value(trip, "drivetrain"),
466
+ climate_consumption=get_child_value(trip, "climate"),
467
+ onboard_electronics_consumption=get_child_value(
468
+ trip, "accessories"
469
+ ),
470
+ battery_care_consumption=get_child_value(trip, "batterycare"),
471
+ regenerated_energy=get_child_value(trip, "regen"),
472
+ distance=get_child_value(trip, "distance"),
473
+ distance_unit=vehicle.odometer_unit,
474
+ )
475
+ trip_stats.append(processed_trip)
476
+ vehicle.daily_stats = trip_stats
477
+ else:
478
+ _LOGGER.debug(
479
+ f"{DOMAIN} - Error with _update_vehicle_properties_trip_details response. Unknown format: {response}"
480
+ )
481
+ else:
482
+ _LOGGER.debug(
483
+ f"{DOMAIN} - Error with _update_vehicle_properties_trip_details response: {response.text}"
466
484
  )
467
- tripStats.append(processedTrip)
468
- vehicle.daily_stats = tripStats
469
485
 
470
486
  def _get_cached_vehicle_state(self, token: Token, vehicle: Vehicle) -> dict:
471
487
  # Vehicle Status Call
@@ -211,6 +211,10 @@ class KiaUvoApiEU(ApiImplType1):
211
211
  def update_vehicle_with_cached_state(self, token: Token, vehicle: Vehicle) -> None:
212
212
  url = self.SPA_API_URL + "vehicles/" + vehicle.id
213
213
  is_ccs2 = vehicle.ccu_ccs2_protocol_support != 0
214
+ _LOGGER.debug(
215
+ f"{DOMAIN} - CCU CCS Support: {vehicle.ccu_ccs2_protocol_support}"
216
+ )
217
+
214
218
  if is_ccs2:
215
219
  url += "/ccs2/carstatus/latest"
216
220
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.40.4
3
+ Version: 3.40.6
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -35,6 +35,7 @@ Dynamic: summary
35
35
 
36
36
  Code Maintainers Wanted
37
37
  =======================
38
+
38
39
  I no longer have a Kia or Hyundai so don't maintain this like I used to. Others who are interested in jumping in are welcome to join the project! Even just pull requests are appreciated!
39
40
 
40
41
  Introduction
@@ -1,10 +1,10 @@
1
1
  hyundai_kia_connect_api/ApiImpl.py,sha256=UeG2FH4KCdU5LvGp5Ks793vrWbwBx8MN_DedbVRRouM,9612
2
- hyundai_kia_connect_api/ApiImplType1.py,sha256=N4xNKM-5WA4zD9d00Nvf5GuGSymbFNAIyY8xtduH4oc,38324
2
+ hyundai_kia_connect_api/ApiImplType1.py,sha256=2tEUFbEhOcbxx8vE15s-taXirq0eg1DPg9EvNTnrlNg,38393
3
3
  hyundai_kia_connect_api/HyundaiBlueLinkApiUSA.py,sha256=dg4r6cI38bFuX-vcI76N0kByKVUNZUlSZ8Jp_68xnAM,37079
4
4
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=433Db-rp3drhyY8ZvN-GiVP85pl90Wwu4A2uAdkYH1c,36100
5
- hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=qZsHdXnxAr9N3FnF6IxpnKbSkv1fHbCDcfDLLbZLm5Q,33784
5
+ hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=eGg9yK8Am4zCVpyC9I3AnnbgTL7QbOigm0ttfWZ5K4w,34532
6
6
  hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=WP-rRI3wZmjuLYZmPXeOSk2NNNc6UhTrpOMuYMG6-iE,47043
7
- hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=ZV3yWd4W-zyN-xS6o_ItQtedLAkEvk5C_yTHGvT2qqU,50172
7
+ hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=E9-teu7OVjLu-hGT3B8aGBfrKDTwFmei7uLt09LJZtE,50285
8
8
  hyundai_kia_connect_api/KiaUvoApiIN.py,sha256=q17gaDhp38wJwn1ceTou1QcDiuDW2wGGjOFTMDRROl8,36318
9
9
  hyundai_kia_connect_api/KiaUvoApiUSA.py,sha256=vwY5wsy68phV_eRTlwI1Q_fL2XY9y4aKxawwWwU_94c,31416
10
10
  hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
@@ -15,10 +15,10 @@ hyundai_kia_connect_api/bluelink.py,sha256=JiNIHl-Qi8zwqyN6ywKg5CdXOLT74WkvpjVcn
15
15
  hyundai_kia_connect_api/const.py,sha256=ImISRt4QarbN8BOBlDGYRB3F69NKCcGu8ddFvNPhhXU,2370
16
16
  hyundai_kia_connect_api/exceptions.py,sha256=0dwKEPXN8KQVTeueDj2fL3E-TQMU7LjTEJbhcq8Mjx8,1467
17
17
  hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
18
- hyundai_kia_connect_api-3.40.4.dist-info/licenses/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
19
- hyundai_kia_connect_api-3.40.4.dist-info/licenses/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
20
- hyundai_kia_connect_api-3.40.4.dist-info/METADATA,sha256=YxA3Nh6yTqsOHW5PkjhHFxv9n-O0_MxMJYvVZMKi34c,7156
21
- hyundai_kia_connect_api-3.40.4.dist-info/WHEEL,sha256=_itY3bZllKbLk93i0gzNzdweAt5eocJdfN7atrjOnvQ,109
22
- hyundai_kia_connect_api-3.40.4.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
23
- hyundai_kia_connect_api-3.40.4.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
24
- hyundai_kia_connect_api-3.40.4.dist-info/RECORD,,
18
+ hyundai_kia_connect_api-3.40.6.dist-info/licenses/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
19
+ hyundai_kia_connect_api-3.40.6.dist-info/licenses/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
20
+ hyundai_kia_connect_api-3.40.6.dist-info/METADATA,sha256=U86ogpbnsTIbWZ3xa1OgheZdAAOuzXWPEjIyTjm-_Ms,7157
21
+ hyundai_kia_connect_api-3.40.6.dist-info/WHEEL,sha256=KsLc7-ImW3kO10_MVVAJ6KE49o7_KqpEzIMxFX-6COY,109
22
+ hyundai_kia_connect_api-3.40.6.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
23
+ hyundai_kia_connect_api-3.40.6.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
24
+ hyundai_kia_connect_api-3.40.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.1.0)
2
+ Generator: setuptools (80.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any