hyundai-kia-connect-api 3.29.2__py2.py3-none-any.whl → 3.30.0__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.

Potentially problematic release.


This version of hyundai-kia-connect-api might be problematic. Click here for more details.

@@ -97,23 +97,28 @@ class VehicleManager:
97
97
  _LOGGER.debug(f"{DOMAIN} - Vehicle Disabled, skipping.")
98
98
 
99
99
  def check_and_force_update_vehicles(self, force_refresh_interval: int) -> None:
100
+ for vehicle_id in self.vehicles.keys():
101
+ self.check_and_force_update_vehicle(force_refresh_interval, vehicle_id)
102
+
103
+ def check_and_force_update_vehicle(
104
+ self, force_refresh_interval: int, vehicle_id: str
105
+ ) -> None:
100
106
  # Force refresh only if current data is older than the value bassed in seconds.
101
107
  # Otherwise runs a cached update.
102
108
  started_at_utc: dt = dt.datetime.now(pytz.utc)
103
- for vehicle_id in self.vehicles.keys():
104
- vehicle = self.get_vehicle(vehicle_id)
105
- if vehicle.last_updated_at is not None:
106
- _LOGGER.debug(
107
- f"{DOMAIN} - Time differential in seconds: {(started_at_utc - vehicle.last_updated_at).total_seconds()}" # noqa
108
- )
109
- if (
110
- started_at_utc - vehicle.last_updated_at
111
- ).total_seconds() > force_refresh_interval:
112
- self.force_refresh_vehicle_state(vehicle_id)
113
- else:
114
- self.update_vehicle_with_cached_state(vehicle_id)
109
+ vehicle = self.get_vehicle(vehicle_id)
110
+ if vehicle.last_updated_at is not None:
111
+ _LOGGER.debug(
112
+ f"{DOMAIN} - Time differential in seconds: {(started_at_utc - vehicle.last_updated_at).total_seconds()}" # noqa
113
+ )
114
+ if (
115
+ started_at_utc - vehicle.last_updated_at
116
+ ).total_seconds() > force_refresh_interval:
117
+ self.force_refresh_vehicle_state(vehicle_id)
115
118
  else:
116
119
  self.update_vehicle_with_cached_state(vehicle_id)
120
+ else:
121
+ self.update_vehicle_with_cached_state(vehicle_id)
117
122
 
118
123
  def force_refresh_all_vehicles_states(self) -> None:
119
124
  for vehicle_id in self.vehicles.keys():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.29.2
3
+ Version: 3.30.0
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
@@ -8,16 +8,16 @@ hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=wNHMuyANzunMzp6DtjJmA1k4DbkXcHvebA
8
8
  hyundai_kia_connect_api/KiaUvoApiUSA.py,sha256=fOXzWmVfRQj_kctJZZvpVb0W0voqo5hyG5E6eHddYjw,30386
9
9
  hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
10
10
  hyundai_kia_connect_api/Vehicle.py,sha256=raCMzJsLuJnVHlFJ16VKdKat55L0uivbbcZRDCGWTxI,18793
11
- hyundai_kia_connect_api/VehicleManager.py,sha256=X_m8H9Jsg-P1x0QmD5wZOVLMppZ4I__ZMi7rOLSTRuE,10940
11
+ hyundai_kia_connect_api/VehicleManager.py,sha256=I0HDOsbXDen-26vyD7YR-RUgdaofOZrv_H_PPPuWjHg,11087
12
12
  hyundai_kia_connect_api/__init__.py,sha256=IkyVeIMbcFJZgLaiiNnUVA1Ferxvrm1bXHKVg01cxvc,319
13
13
  hyundai_kia_connect_api/bluelink.py,sha256=sBU7hlElie21GU4Ma-i4a5vdztGc2jtmlVBbbgUqmTE,19720
14
14
  hyundai_kia_connect_api/const.py,sha256=HE0_1_be4ERB73vsekWxv6TDWd8cvAgY1oPZojUrcwM,2096
15
15
  hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
16
16
  hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
17
- hyundai_kia_connect_api-3.29.2.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
18
- hyundai_kia_connect_api-3.29.2.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
19
- hyundai_kia_connect_api-3.29.2.dist-info/METADATA,sha256=GoSURW8PyGt2Gbvmw7fuR1EnYEqBrmcpNtvsEvGQp2E,6674
20
- hyundai_kia_connect_api-3.29.2.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
21
- hyundai_kia_connect_api-3.29.2.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
22
- hyundai_kia_connect_api-3.29.2.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
23
- hyundai_kia_connect_api-3.29.2.dist-info/RECORD,,
17
+ hyundai_kia_connect_api-3.30.0.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
18
+ hyundai_kia_connect_api-3.30.0.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
19
+ hyundai_kia_connect_api-3.30.0.dist-info/METADATA,sha256=1vb9sZTrsL_iKp7KhTdcaKLxgaPMN9we2jHZFAfVAcA,6674
20
+ hyundai_kia_connect_api-3.30.0.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
21
+ hyundai_kia_connect_api-3.30.0.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
22
+ hyundai_kia_connect_api-3.30.0.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
23
+ hyundai_kia_connect_api-3.30.0.dist-info/RECORD,,