hyundai-kia-connect-api 3.24.2__py2.py3-none-any.whl → 3.25.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.

@@ -212,3 +212,11 @@ class ApiImpl:
212
212
  Schedule charging and climate control. Returns the tracking ID
213
213
  """
214
214
  pass
215
+
216
+ def start_hazard_lights(self, token: Token, vehicle: Vehicle) -> str:
217
+ """Turns on the hazard lights for 30 seconds"""
218
+ pass
219
+
220
+ def start_hazard_lights_and_horn(self, token: Token, vehicle: Vehicle) -> str:
221
+ """Turns on the hazard lights and horn for 30 seconds"""
222
+ pass
@@ -648,9 +648,9 @@ class KiaUvoAPIUSA(ApiImpl):
648
648
  "airCtrl": options.climate,
649
649
  "defrost": options.defrost,
650
650
  "heatingAccessory": {
651
- "rearWindow": int(options.heating),
652
- "sideMirror": int(options.heating),
653
- "steeringWheel": int(options.heating),
651
+ "rearWindow": 1 if options.heating in [3, 4] else 0,
652
+ "sideMirror": 1 if options.heating == 4 else 0,
653
+ "steeringWheel": 1 if options.heating in [2, 4] else 0,
654
654
  },
655
655
  "ignitionOnDuration": {
656
656
  "unit": 4,
@@ -1035,6 +1035,36 @@ class KiaUvoApiEU(ApiImplType1):
1035
1035
  token.device_id = self._get_device_id(self._get_stamp())
1036
1036
  return response["msgId"]
1037
1037
 
1038
+ def start_hazard_lights(self, token: Token, vehicle: Vehicle) -> str:
1039
+ url = self.SPA_API_URL_V2 + "vehicles/" + vehicle.id + "/ccs2/control/light"
1040
+
1041
+ payload = {"command": "on"}
1042
+ _LOGGER.debug(f"{DOMAIN} - Start Hazard Lights Request: {payload}")
1043
+ response = requests.post(
1044
+ url,
1045
+ json=payload,
1046
+ headers=self._get_control_headers(token, vehicle),
1047
+ ).json()
1048
+ _LOGGER.debug(f"{DOMAIN} - Start Hazard Lights Response: {response}")
1049
+ _check_response_for_errors(response)
1050
+ token.device_id = self._get_device_id(self._get_stamp())
1051
+ return response["msgId"]
1052
+
1053
+ def start_hazard_lights_and_horn(self, token: Token, vehicle: Vehicle) -> str:
1054
+ url = self.SPA_API_URL_V2 + "vehicles/" + vehicle.id + "/ccs2/control/hornlight"
1055
+
1056
+ payload = {"command": "on"}
1057
+ _LOGGER.debug(f"{DOMAIN} - Start Hazard Lights and Horn Request: {payload}")
1058
+ response = requests.post(
1059
+ url,
1060
+ json=payload,
1061
+ headers=self._get_control_headers(token, vehicle),
1062
+ ).json()
1063
+ _LOGGER.debug(f"{DOMAIN} - Start Hazard Lights and Horn Response: {response}")
1064
+ _check_response_for_errors(response)
1065
+ token.device_id = self._get_device_id(self._get_stamp())
1066
+ return response["msgId"]
1067
+
1038
1068
  def _get_charge_limits(self, token: Token, vehicle: Vehicle) -> dict:
1039
1069
  # Not currently used as value is in the general get.
1040
1070
  # Most likely this forces the car the update it.
@@ -160,6 +160,14 @@ class VehicleManager:
160
160
  def stop_charge(self, vehicle_id: str) -> str:
161
161
  return self.api.stop_charge(self.token, self.get_vehicle(vehicle_id))
162
162
 
163
+ def start_hazard_lights(self, vehicle_id: str) -> str:
164
+ return self.api.start_hazard_lights(self.token, self.get_vehicle(vehicle_id))
165
+
166
+ def start_hazard_lights_and_horn(self, vehicle_id: str) -> str:
167
+ return self.api.start_hazard_lights_and_horn(
168
+ self.token, self.get_vehicle(vehicle_id)
169
+ )
170
+
163
171
  def set_charge_limits(self, vehicle_id: str, ac: int, dc: int) -> str:
164
172
  return self.api.set_charge_limits(
165
173
  self.token, self.get_vehicle(vehicle_id), ac, dc
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.24.2
3
+ Version: 3.25.0
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
- Home-page: https://github.com/fuatakgun/hyundai_kia_connect_api
5
+ Home-page: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
7
7
  Author-email: fuatakgun@gmail.com
8
8
  License: MIT license
@@ -29,14 +29,14 @@ I no longer have a Kia or Hyundai so don't maintain this like I used to. Others
29
29
  Introduction
30
30
  ============
31
31
 
32
- This is a Kia UVO, Hyundai Bluelink, Genesis Connect(Canada Only) written in python. It is primary consumed by home assistant. If you are looking for a home assistant Kia / Hyundai implementation please look here: https://github.com/fuatakgun/kia_uvo. Much of this base code came from reading bluelinky and contributions to the kia_uvo home assistant project.
32
+ This is a Kia UVO, Hyundai Bluelink, Genesis Connect(Canada Only) written in python. It is primary consumed by home assistant. If you are looking for a home assistant Kia / Hyundai implementation please look here: https://github.com/Hyundai-Kia-Connect/kia_uvo. Much of this base code came from reading bluelinky (https://github.com/Hacksore/bluelinky) and contributions to the kia_uvo home assistant project.
33
33
 
34
34
  Usage
35
35
  =====
36
36
 
37
37
  This package is designed to simplify the complexity of using multiple regions. It attempts to standardize the usage regardless of what brand or region the car is in. That isn't always possible though, in particular some features differ from one to the next.
38
38
 
39
- Python 3.9 or newer is required to use this package. Vehicle manager is the key class that is called to manage the vehicle lists. One vehicle manager should be used per login. Key data points required to instantiate vehicle manager are::
39
+ Python 3.10 or newer is required to use this package. Vehicle manager is the key class that is called to manage the vehicle lists. One vehicle manager should be used per login. Key data points required to instantiate vehicle manager are::
40
40
 
41
41
  region: int
42
42
  brand: int,
@@ -44,7 +44,7 @@ Python 3.9 or newer is required to use this package. Vehicle manager is the key
44
44
  password: str
45
45
  pin: str (required for CA, and potentially USA, otherwise pass a blank string)
46
46
 
47
- Key values for the int exist in the constant(https://github.com/fuatakgun/hyundai_kia_connect_api/blob/master/hyundai_kia_connect_api/const.py) file as::
47
+ Key values for the int exist in the constant(https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/blob/master/hyundai_kia_connect_api/const.py) file as::
48
48
 
49
49
  REGIONS = {1: REGION_EUROPE, 2: REGION_CANADA, 3: REGION_USA, 4: REGION_CHINA, 5: REGION_AUSTRALIA}
50
50
  BRANDS = {1: BRAND_KIA, 2: BRAND_HYUNDAI, 3: BRAND_GENESIS}
@@ -1,21 +1,21 @@
1
- hyundai_kia_connect_api/ApiImpl.py,sha256=7tB6PZTEVlw-GCfEjU4ekq_ZgnFseYLrEYpbUyEoL84,6866
1
+ hyundai_kia_connect_api/ApiImpl.py,sha256=IJUcBO2XXHVqnHAEs7UIwaeJ0c8ueJtHTBZbqGgqaEM,7172
2
2
  hyundai_kia_connect_api/ApiImplType1.py,sha256=PnKwpbCoYGOXBWzBLIlDSrC6daIYeW9qlfW7TM4HCU0,12184
3
3
  hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=MK1cFcnuZebogz32-nXjHt0pAgQ1-2lrurw8SADX6ww,36690
4
- hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=FmRc7bAmsOz9jBtWSAb8lD0ybRMN0OgfEPZZJbPhMUw,31292
4
+ hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=LbEh7EM19kpvhwPSMpEYIHVNUSOJsuvNjcXJzyc_P8A,31338
5
5
  hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=tslh0gzvPBwYJmcWlf9B0l7PyYZdy2e7GqpRkl8_Svk,48471
6
6
  hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=B3Lks_ONr3l01QLl-GQBPdktXj9PZWKuQKRLYmJ7kP4,30763
7
7
  hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cwIPZ0dU6HolKdooUQeQKlLAic6YU8dQmNs0VQDBgpQ,47035
8
- hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=_wNkctkIO2hrf1K2LTZPtHWZ5ewTcXqTv0s_AXRXI2I,68254
8
+ hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=mwIpAV1r3oBRHAEX4RD3b3oPFWC-Lhi5Zaa_7mVXX_M,69587
9
9
  hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
10
10
  hyundai_kia_connect_api/Vehicle.py,sha256=M95Eq1vK-th5se7dZHEDcTOM1b19GIjpecyw2MKykQ8,18639
11
- hyundai_kia_connect_api/VehicleManager.py,sha256=REny83eNXERAcnw8qrBZ9dh6qODCvd5Z_jmSY2JtXvY,10196
11
+ hyundai_kia_connect_api/VehicleManager.py,sha256=foykw9aefrcASYWGE9Xyk0N3zBoTQO64_YbXfBaX3g0,10528
12
12
  hyundai_kia_connect_api/__init__.py,sha256=IkyVeIMbcFJZgLaiiNnUVA1Ferxvrm1bXHKVg01cxvc,319
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.24.2.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
- hyundai_kia_connect_api-3.24.2.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
- hyundai_kia_connect_api-3.24.2.dist-info/METADATA,sha256=jBhEZSSycXW3f31TmjPNIr32pDKm2T01Y9VnfAxJ-1U,6071
19
- hyundai_kia_connect_api-3.24.2.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
20
- hyundai_kia_connect_api-3.24.2.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
- hyundai_kia_connect_api-3.24.2.dist-info/RECORD,,
16
+ hyundai_kia_connect_api-3.25.0.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
17
+ hyundai_kia_connect_api-3.25.0.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
18
+ hyundai_kia_connect_api-3.25.0.dist-info/METADATA,sha256=6NScAQewURNKDYdaLBOtH8LhMPVhetu7TzxRF6YUnig,6142
19
+ hyundai_kia_connect_api-3.25.0.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
20
+ hyundai_kia_connect_api-3.25.0.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
21
+ hyundai_kia_connect_api-3.25.0.dist-info/RECORD,,