hyundai-kia-connect-api 3.20.7__py2.py3-none-any.whl → 3.21.1__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.
@@ -146,6 +146,13 @@ class ApiImpl:
146
146
  """Sets charge limits. Returns the tracking ID"""
147
147
  pass
148
148
 
149
+ def set_charging_current(self, token: Token, vehicle: Vehicle, level: int) -> str:
150
+ """
151
+ Europe feature only.
152
+ Sets charge current level (1=100%, 2=90%, 3=60%). Returns the tracking ID
153
+ """
154
+ pass
155
+
149
156
  def set_windows_state(
150
157
  self, token: Token, vehicle: Vehicle, options: WindowRequestOptions
151
158
  ) -> str:
@@ -231,6 +231,9 @@ class ApiImplType1(ApiImpl):
231
231
  vehicle.ev_charge_limits_dc = get_child_value(
232
232
  state, "Green.ChargingInformation.TargetSoC.Quick"
233
233
  )
234
+ vehicle.ev_charging_current = get_child_value(
235
+ state, "Green.ChargingInformation.ElectricCurrentLevel.State"
236
+ )
234
237
  vehicle.ev_v2l_discharge_limit = get_child_value(
235
238
  state, "Green.Electric.SmartGrid.VehicleToLoad.DischargeLimitation.SoC"
236
239
  )
@@ -1285,6 +1285,23 @@ class KiaUvoApiEU(ApiImplType1):
1285
1285
  _check_response_for_errors(response)
1286
1286
  return response["msgId"]
1287
1287
 
1288
+ def set_charging_current(self, token: Token, vehicle: Vehicle, level: int) -> str:
1289
+ url = (
1290
+ self.SPA_API_URL + "vehicles/" + vehicle.id + "/ccs2/charge/chargingcurrent"
1291
+ )
1292
+
1293
+ body = {"chargingCurrent": level}
1294
+ response = requests.post(
1295
+ url,
1296
+ json=body,
1297
+ headers=self._get_authenticated_headers(
1298
+ token, vehicle.ccu_ccs2_protocol_support
1299
+ ),
1300
+ ).json()
1301
+ _LOGGER.debug(f"{DOMAIN} - Set Charging Current Response: {response}")
1302
+ _check_response_for_errors(response)
1303
+ return response["msgId"]
1304
+
1288
1305
  def schedule_charging_and_climate(
1289
1306
  self,
1290
1307
  token: Token,
@@ -159,6 +159,7 @@ class Vehicle:
159
159
 
160
160
  ev_charge_limits_dc: typing.Union[int, None] = None
161
161
  ev_charge_limits_ac: typing.Union[int, None] = None
162
+ ev_charging_current: typing.Union[int, None] = None # Europe feature only
162
163
  ev_v2l_discharge_limit: typing.Union[int, None] = None
163
164
 
164
165
  # energy consumed and regenerated since the vehicle was paired with the account
@@ -165,6 +165,11 @@ class VehicleManager:
165
165
  self.token, self.get_vehicle(vehicle_id), ac, dc
166
166
  )
167
167
 
168
+ def set_charging_current(self, vehicle_id: str, level: int) -> str:
169
+ return self.api.set_charging_current(
170
+ self.token, self.get_vehicle(vehicle_id), level
171
+ )
172
+
168
173
  def set_windows_state(self, vehicle_id: str, options: WindowRequestOptions) -> str:
169
174
  return self.api.set_windows_state(
170
175
  self.token, self.get_vehicle(vehicle_id), options
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.20.7
3
+ Version: 3.21.1
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,21 +1,21 @@
1
- hyundai_kia_connect_api/ApiImpl.py,sha256=Feago4yTEgen2CpAzwNnAjUpz_5STLG1G7lesGlEy6o,5955
2
- hyundai_kia_connect_api/ApiImplType1.py,sha256=pCFDFF1nN9eRun5zT462af5Xxu-Q0zYAUUStcoy5DJI,12037
1
+ hyundai_kia_connect_api/ApiImpl.py,sha256=Lelebhg03S9JrHkxibLSeW73W0x0dFAQbqBvpBvdBXs,6191
2
+ hyundai_kia_connect_api/ApiImplType1.py,sha256=-TwcG1wibYmQ96lK_rTl-O1Wh0Kd-Zi5d1tS59uSRwQ,12176
3
3
  hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=fnCL59hZBYOJ25851nDQRcNngFqhH2q3ZRxfXN_4CTo,28126
4
4
  hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=llCsBbefkfZMzu4Vz4KXk-1FDZfLTPDelAN2kxaC4hA,31115
5
5
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=FeK502Zysgcg3Yx31mjTh4rivFRuGB2sS07TldBzchk,48014
6
6
  hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=F2OI52H2bpX4hDHRrbjWt2Y6iODu7iIEfxFF7W52Jh4,30450
7
7
  hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cW9YRmt5CPUTB9dHEO7B1ev8SnLjeyzuLN9o50V7JXc,46852
8
- hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=601a0tupizs1SfQ_J42-r6T9ivYlN6bpQMPZQsxCy6Y,68136
8
+ hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=6RGVHoDpegx1wT_SfMNp99HGII-9CUr1ziF_V3mStPs,68755
9
9
  hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
10
- hyundai_kia_connect_api/Vehicle.py,sha256=dCTVt4or61iauBwx4sf0gD2u8NT48qlTOjYpblkhGUM,15683
11
- hyundai_kia_connect_api/VehicleManager.py,sha256=YWWr47xqrXKfGk3f4AYFc3orupuixPTfc6HZ7He-A9A,9967
10
+ hyundai_kia_connect_api/Vehicle.py,sha256=Gec5vHBoK2bevRvpbjmQJo5yJf2Ov_4ed9gF8wJUdl4,15762
11
+ hyundai_kia_connect_api/VehicleManager.py,sha256=b-umPTBNFn5gmJcXQr7Qi978UVTJQrWhp_r15HdMOuw,10156
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=54O8Y9Xma0SqeK2c_mqX4AJGJXQWma7POZJizFPPlvo,1711
16
- hyundai_kia_connect_api-3.20.7.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
- hyundai_kia_connect_api-3.20.7.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
- hyundai_kia_connect_api-3.20.7.dist-info/METADATA,sha256=2Jaiyg0vVMX-mEOjalde67HMM9L6z-lpm0VbSYQmhA0,6045
19
- hyundai_kia_connect_api-3.20.7.dist-info/WHEEL,sha256=pOwdCRdxkCaq8tWTvnGIC-q_meWYHwmqvvQPkeaM2I4,109
20
- hyundai_kia_connect_api-3.20.7.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
- hyundai_kia_connect_api-3.20.7.dist-info/RECORD,,
16
+ hyundai_kia_connect_api-3.21.1.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
+ hyundai_kia_connect_api-3.21.1.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
+ hyundai_kia_connect_api-3.21.1.dist-info/METADATA,sha256=bEob2hNHE8DdFM3Gv-EruyUMZ7N1gZhC6dZbZ_fx-T4,6045
19
+ hyundai_kia_connect_api-3.21.1.dist-info/WHEEL,sha256=_4XEmVmaBFWtekSGrbfOGNjC2I5lUr0lZSRblBllIFA,109
20
+ hyundai_kia_connect_api-3.21.1.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
+ hyundai_kia_connect_api-3.21.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.0)
2
+ Generator: setuptools (70.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any