hyundai-kia-connect-api 3.23.2__py2.py3-none-any.whl → 3.23.4__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.
@@ -48,9 +48,8 @@ class ApiImplType1(ApiImpl):
48
48
 
49
49
  def _update_vehicle_properties_ccs2(self, vehicle: Vehicle, state: dict) -> None:
50
50
  if get_child_value(state, "Date"):
51
- # `Date` field is in UTC time
52
51
  vehicle.last_updated_at = parse_datetime(
53
- get_child_value(state, "Date"), dt.timezone.utc
52
+ get_child_value(state, "Date"), self.data_timezone
54
53
  )
55
54
  else:
56
55
  vehicle.last_updated_at = dt.datetime.now(self.data_timezone)
@@ -356,7 +356,17 @@ class Vehicle:
356
356
 
357
357
  @last_updated_at.setter
358
358
  def last_updated_at(self, value):
359
- self._last_updated_at = get_safe_local_datetime(value)
359
+ # workaround for: Timestamp of "last_updated_at" sensor is wrong #931
360
+ # https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/931#issuecomment-2381569934
361
+ newest_updated_at = get_safe_local_datetime(value)
362
+ previous_updated_at = self._last_updated_at
363
+ if newest_updated_at and previous_updated_at: # both filled
364
+ if newest_updated_at < previous_updated_at:
365
+ utcoffset = newest_updated_at.utcoffset()
366
+ newest_updated_at_corrected = newest_updated_at + utcoffset
367
+ if newest_updated_at_corrected >= previous_updated_at:
368
+ newest_updated_at = newest_updated_at_corrected
369
+ self._last_updated_at = newest_updated_at
360
370
 
361
371
  @property
362
372
  def location_latitude(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.23.2
3
+ Version: 3.23.4
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/fuatakgun/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -1,5 +1,5 @@
1
1
  hyundai_kia_connect_api/ApiImpl.py,sha256=7tB6PZTEVlw-GCfEjU4ekq_ZgnFseYLrEYpbUyEoL84,6866
2
- hyundai_kia_connect_api/ApiImplType1.py,sha256=ZvQN_YESiXXCSvcy-fXRAwHQ_r9cc01msrUlUsBs4Zc,12223
2
+ hyundai_kia_connect_api/ApiImplType1.py,sha256=PnKwpbCoYGOXBWzBLIlDSrC6daIYeW9qlfW7TM4HCU0,12184
3
3
  hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=xHUpj-1bzHQL4w82kRAt9FMB8ze_DoqZinK6djCyeKY,35619
4
4
  hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=Cvkjat13g4AmETUxjpLkwCnB9i0Unck2jKExOCsPjcw,31146
5
5
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=Mzw0Ov5la4mQvWOXWYpvAfrM6l2BSBEusaPFsL3kn2I,48127
@@ -7,15 +7,15 @@ hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=6bBPav3GC4xEl5y-4A6RHThtf7R0jeb2ys
7
7
  hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cwIPZ0dU6HolKdooUQeQKlLAic6YU8dQmNs0VQDBgpQ,47035
8
8
  hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=eijKZFBOl2cSsbELzUCpSVfIxdSwNC5EtMHDErvZczY,68253
9
9
  hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
10
- hyundai_kia_connect_api/Vehicle.py,sha256=CKQbyKwCbx7-xN3SYMsi9JCz4P9jHeNlo37BEC3xu1g,17821
10
+ hyundai_kia_connect_api/Vehicle.py,sha256=vxblPgnv9OfJo8Irui0n5HpkjaBgwtt02q5V-KPnNYc,18487
11
11
  hyundai_kia_connect_api/VehicleManager.py,sha256=REny83eNXERAcnw8qrBZ9dh6qODCvd5Z_jmSY2JtXvY,10196
12
12
  hyundai_kia_connect_api/__init__.py,sha256=i2kXYjBEKSvT1e8FoQ7V7oqAyL22w3XzF2rAFpyietc,578
13
13
  hyundai_kia_connect_api/const.py,sha256=ofi_ZfGxJYo0FWIcGFbIMSMRdKRtaK4GUDhFiQRvZeI,2007
14
14
  hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
15
15
  hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
16
- hyundai_kia_connect_api-3.23.2.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
- hyundai_kia_connect_api-3.23.2.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
- hyundai_kia_connect_api-3.23.2.dist-info/METADATA,sha256=U2_-HdqSqM59VBvZCCYrVewp8jlZe427nZWlBjHu3QE,6069
19
- hyundai_kia_connect_api-3.23.2.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
20
- hyundai_kia_connect_api-3.23.2.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
- hyundai_kia_connect_api-3.23.2.dist-info/RECORD,,
16
+ hyundai_kia_connect_api-3.23.4.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
+ hyundai_kia_connect_api-3.23.4.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
+ hyundai_kia_connect_api-3.23.4.dist-info/METADATA,sha256=NvttUgwp7LLl-yK4bAh0_4i9z7nRXbVAaHdP5CFrLA4,6069
19
+ hyundai_kia_connect_api-3.23.4.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
20
+ hyundai_kia_connect_api-3.23.4.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
+ hyundai_kia_connect_api-3.23.4.dist-info/RECORD,,