hyundai-kia-connect-api 3.20.3__tar.gz → 3.20.6__tar.gz

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.
Files changed (46) hide show
  1. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/PKG-INFO +2 -1
  2. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py +3 -1
  3. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/KiaUvoAPIUSA.py +71 -60
  4. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/PKG-INFO +2 -1
  5. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/requires.txt +1 -0
  6. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/requirements.txt +1 -0
  7. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/setup.py +1 -1
  8. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/AUTHORS.rst +0 -0
  9. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/CONTRIBUTING.rst +0 -0
  10. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/HISTORY.rst +0 -0
  11. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/LICENSE +0 -0
  12. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/MANIFEST.in +0 -0
  13. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/README.rst +0 -0
  14. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/Makefile +0 -0
  15. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/authors.rst +0 -0
  16. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/conf.py +0 -0
  17. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/contributing.rst +0 -0
  18. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/history.rst +0 -0
  19. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/index.rst +0 -0
  20. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/installation.rst +0 -0
  21. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/make.bat +0 -0
  22. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/readme.rst +0 -0
  23. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/docs/usage.rst +0 -0
  24. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/ApiImpl.py +0 -0
  25. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/ApiImplType1.py +0 -0
  26. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/KiaUvoApiAU.py +0 -0
  27. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/KiaUvoApiCA.py +0 -0
  28. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/KiaUvoApiCN.py +0 -0
  29. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/KiaUvoApiEU.py +0 -0
  30. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/Token.py +0 -0
  31. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/Vehicle.py +0 -0
  32. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/VehicleManager.py +0 -0
  33. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/__init__.py +0 -0
  34. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/const.py +0 -0
  35. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/exceptions.py +0 -0
  36. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api/utils.py +0 -0
  37. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/SOURCES.txt +0 -0
  38. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/dependency_links.txt +0 -0
  39. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/not-zip-safe +0 -0
  40. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/hyundai_kia_connect_api.egg-info/top_level.txt +0 -0
  41. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/setup.cfg +0 -0
  42. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/tests/__init__.py +0 -0
  43. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/tests/au_login_test.py +0 -0
  44. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/tests/ca_login_test.py +0 -0
  45. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/tests/eu_check_response_for_errors_test.py +0 -0
  46. {hyundai_kia_connect_api-3.20.3 → hyundai_kia_connect_api-3.20.6}/tests/eu_login_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.20.3
3
+ Version: 3.20.6
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
@@ -19,6 +19,7 @@ Requires-Dist: beautifulsoup4>=4.10.0
19
19
  Requires-Dist: curlify>=2.2.1
20
20
  Requires-Dist: python-dateutil
21
21
  Requires-Dist: pytz>=2021.3
22
+ Requires-Dist: certifi>=2024.6.2
22
23
 
23
24
  Code Maintainers Wanted
24
25
  =======================
@@ -7,6 +7,8 @@ import time
7
7
  import datetime as dt
8
8
  import pytz
9
9
  import requests
10
+ import certifi
11
+
10
12
  from requests.adapters import HTTPAdapter
11
13
  from urllib3.util.ssl_ import create_urllib3_context
12
14
 
@@ -42,7 +44,7 @@ class cipherAdapter(HTTPAdapter):
42
44
 
43
45
  def init_poolmanager(self, *args, **kwargs):
44
46
  kwargs["ssl_context"] = self._setup_ssl_context()
45
-
47
+ kwargs["ca_certs"] = certifi.where()
46
48
  return super().init_poolmanager(*args, **kwargs)
47
49
 
48
50
  def proxy_manager_for(self, *args, **kwargs):
@@ -11,6 +11,7 @@ import time
11
11
  import typing
12
12
  from datetime import datetime
13
13
 
14
+ import certifi
14
15
  import pytz
15
16
  import requests
16
17
  from requests import RequestException, Response
@@ -41,6 +42,7 @@ class KiaSSLAdapter(HTTPAdapter):
41
42
  ciphers="DEFAULT:@SECLEVEL=1", ssl_version=ssl.PROTOCOL_TLSv1_2
42
43
  )
43
44
  kwargs["ssl_context"] = context
45
+ kwargs["ca_certs"] = certifi.where()
44
46
  return super().init_poolmanager(*args, **kwargs)
45
47
 
46
48
 
@@ -417,7 +419,7 @@ class KiaUvoAPIUSA(ApiImpl):
417
419
  vehicle.ev_charge_limits_dc = [
418
420
  x["targetSOClevel"] for x in ChargeDict if x["plugType"] == 0
419
421
  ][-1]
420
- except:
422
+ except Exception:
421
423
  _LOGGER.debug(f"{DOMAIN} - SOC Levels couldn't be found. May not be an EV.")
422
424
 
423
425
  vehicle.ev_driving_range = (
@@ -629,51 +631,6 @@ class KiaUvoAPIUSA(ApiImpl):
629
631
  options.defrost = False
630
632
  if options.duration is None:
631
633
  options.duration = 5
632
- if options.front_left_seat is None:
633
- options.front_left_seat = 0
634
- if options.front_right_seat is None:
635
- options.front_right_seat = 0
636
- if options.rear_left_seat is None:
637
- options.rear_left_seat = 0
638
- if options.rear_right_seat is None:
639
- options.rear_right_seat = 0
640
-
641
- front_left_heatVentType = 0
642
- front_right_heatVentType = 0
643
- rear_left_heatVentType = 0
644
- rear_right_heatVentType = 0
645
- front_left_heatVentLevel = 0
646
- front_right_heatVentLevel = 0
647
- rear_left_heatVentLevel = 0
648
- rear_right_heatVentLevel = 0
649
-
650
- # heated
651
- if options.front_left_seat in (6, 7, 8):
652
- front_left_heatVentType = 1
653
- front_left_heatVentLevel = options.front_left_seat - 4
654
- if options.front_right_seat in (6, 7, 8):
655
- front_right_heatVentType = 1
656
- front_right_heatVentLevel = options.front_right_seat - 4
657
- if options.rear_left_seat in (6, 7, 8):
658
- rear_left_heatVentType = 1
659
- rear_left_heatVentLevel = options.rear_left_seat - 4
660
- if options.rear_right_seat in (6, 7, 8):
661
- rear_right_heatVentType = 1
662
- rear_right_heatVentLevel = options.rear_right_seat - 4
663
-
664
- # ventilated
665
- if options.front_left_seat in (3, 4, 5):
666
- front_left_heatVentType = 2
667
- front_left_heatVentLevel = options.front_left_seat - 1
668
- if options.front_right_seat in (3, 4, 5):
669
- front_right_heatVentType = 2
670
- front_right_heatVentLevel = options.front_right_seat - 1
671
- if options.rear_left_seat in (3, 4, 5):
672
- rear_left_heatVentType = 2
673
- rear_left_heatVentLevel = options.rear_left_seat - 1
674
- if options.rear_right_seat in (3, 4, 5):
675
- rear_right_heatVentType = 2
676
- rear_right_heatVentLevel = options.rear_right_seat - 1
677
634
 
678
635
  body = {
679
636
  "remoteClimate": {
@@ -681,19 +638,74 @@ class KiaUvoAPIUSA(ApiImpl):
681
638
  "unit": 1,
682
639
  "value": str(options.set_temp),
683
640
  },
641
+ "airCtrl": options.climate,
642
+ "defrost": options.defrost,
643
+ "heatingAccessory": {
644
+ "rearWindow": int(options.heating),
645
+ "sideMirror": int(options.heating),
646
+ "steeringWheel": int(options.heating),
647
+ },
648
+ "ignitionOnDuration": {
649
+ "unit": 4,
650
+ "value": options.duration,
651
+ },
684
652
  },
685
- "airCtrl": options.climate,
686
- "defrost": options.defrost,
687
- "heatingAccessory": {
688
- "rearWindow": int(options.heating),
689
- "sideMirror": int(options.heating),
690
- "steeringWheel": int(options.heating),
691
- },
692
- "ignitionOnDuration": {
693
- "unit": 4,
694
- "value": options.duration,
695
- },
696
- "heatVentSeat": {
653
+ }
654
+
655
+ # Kia seems to now be checking if you can set the heated/vented seats at the car level
656
+ # only add to body if the option is not none for any of the seats
657
+ if (
658
+ options.front_left_seat is not None
659
+ or options.front_right_seat is not None
660
+ or options.rear_left_seat is not None
661
+ or options.rear_right_seat is not None
662
+ ):
663
+ if options.front_left_seat is None:
664
+ options.front_left_seat = 0
665
+ if options.front_right_seat is None:
666
+ options.front_right_seat = 0
667
+ if options.rear_left_seat is None:
668
+ options.rear_left_seat = 0
669
+ if options.rear_right_seat is None:
670
+ options.rear_right_seat = 0
671
+
672
+ front_left_heatVentType = 0
673
+ front_right_heatVentType = 0
674
+ rear_left_heatVentType = 0
675
+ rear_right_heatVentType = 0
676
+ front_left_heatVentLevel = 0
677
+ front_right_heatVentLevel = 0
678
+ rear_left_heatVentLevel = 0
679
+ rear_right_heatVentLevel = 0
680
+
681
+ # heated
682
+ if options.front_left_seat in (6, 7, 8):
683
+ front_left_heatVentType = 1
684
+ front_left_heatVentLevel = options.front_left_seat - 4
685
+ if options.front_right_seat in (6, 7, 8):
686
+ front_right_heatVentType = 1
687
+ front_right_heatVentLevel = options.front_right_seat - 4
688
+ if options.rear_left_seat in (6, 7, 8):
689
+ rear_left_heatVentType = 1
690
+ rear_left_heatVentLevel = options.rear_left_seat - 4
691
+ if options.rear_right_seat in (6, 7, 8):
692
+ rear_right_heatVentType = 1
693
+ rear_right_heatVentLevel = options.rear_right_seat - 4
694
+
695
+ # ventilated
696
+ if options.front_left_seat in (3, 4, 5):
697
+ front_left_heatVentType = 2
698
+ front_left_heatVentLevel = options.front_left_seat - 1
699
+ if options.front_right_seat in (3, 4, 5):
700
+ front_right_heatVentType = 2
701
+ front_right_heatVentLevel = options.front_right_seat - 1
702
+ if options.rear_left_seat in (3, 4, 5):
703
+ rear_left_heatVentType = 2
704
+ rear_left_heatVentLevel = options.rear_left_seat - 1
705
+ if options.rear_right_seat in (3, 4, 5):
706
+ rear_right_heatVentType = 2
707
+ rear_right_heatVentLevel = options.rear_right_seat - 1
708
+ body["remoteClimate"]["heatVentSeat"] = {
697
709
  "driverSeat": {
698
710
  "heatVentType": front_left_heatVentType,
699
711
  "heatVentLevel": front_left_heatVentLevel,
@@ -714,8 +726,7 @@ class KiaUvoAPIUSA(ApiImpl):
714
726
  "heatVentLevel": rear_right_heatVentLevel,
715
727
  "heatVentStep": 1,
716
728
  },
717
- },
718
- }
729
+ }
719
730
  _LOGGER.debug(f"{DOMAIN} - Planned start_climate payload: {body}")
720
731
  response = self.post_request_with_logging_and_active_session(
721
732
  token=token, url=url, json_body=body, vehicle=vehicle
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.20.3
3
+ Version: 3.20.6
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
@@ -19,6 +19,7 @@ Requires-Dist: beautifulsoup4>=4.10.0
19
19
  Requires-Dist: curlify>=2.2.1
20
20
  Requires-Dist: python-dateutil
21
21
  Requires-Dist: pytz>=2021.3
22
+ Requires-Dist: certifi>=2024.6.2
22
23
 
23
24
  Code Maintainers Wanted
24
25
  =======================
@@ -2,3 +2,4 @@ beautifulsoup4>=4.10.0
2
2
  curlify>=2.2.1
3
3
  python-dateutil
4
4
  pytz>=2021.3
5
+ certifi>=2024.6.2
@@ -2,3 +2,4 @@ beautifulsoup4>=4.10.0
2
2
  curlify>=2.2.1
3
3
  python-dateutil
4
4
  pytz>=2021.3
5
+ certifi>=2024.6.2
@@ -44,6 +44,6 @@ setup(
44
44
  test_suite="tests",
45
45
  tests_require=test_requirements,
46
46
  url="https://github.com/fuatakgun/hyundai_kia_connect_api",
47
- version="3.20.3",
47
+ version="3.20.6",
48
48
  zip_safe=False,
49
49
  )