hyundai-kia-connect-api 3.20.2__tar.gz → 3.20.5__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.2 → hyundai_kia_connect_api-3.20.5}/PKG-INFO +2 -1
  2. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/KiaUvoAPIUSA.py +79 -68
  3. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/utils.py +0 -1
  4. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/PKG-INFO +2 -1
  5. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/requires.txt +1 -0
  6. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/requirements.txt +1 -0
  7. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/setup.py +1 -1
  8. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/AUTHORS.rst +0 -0
  9. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/CONTRIBUTING.rst +0 -0
  10. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/HISTORY.rst +0 -0
  11. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/LICENSE +0 -0
  12. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/MANIFEST.in +0 -0
  13. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/README.rst +0 -0
  14. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/Makefile +0 -0
  15. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/authors.rst +0 -0
  16. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/conf.py +0 -0
  17. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/contributing.rst +0 -0
  18. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/history.rst +0 -0
  19. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/index.rst +0 -0
  20. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/installation.rst +0 -0
  21. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/make.bat +0 -0
  22. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/readme.rst +0 -0
  23. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/docs/usage.rst +0 -0
  24. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/ApiImpl.py +0 -0
  25. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/ApiImplType1.py +0 -0
  26. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py +0 -0
  27. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/KiaUvoApiAU.py +0 -0
  28. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/KiaUvoApiCA.py +0 -0
  29. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/KiaUvoApiCN.py +0 -0
  30. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/KiaUvoApiEU.py +0 -0
  31. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/Token.py +0 -0
  32. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/Vehicle.py +0 -0
  33. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/VehicleManager.py +0 -0
  34. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/__init__.py +0 -0
  35. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/const.py +0 -0
  36. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api/exceptions.py +0 -0
  37. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/SOURCES.txt +0 -0
  38. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/dependency_links.txt +0 -0
  39. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/not-zip-safe +0 -0
  40. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/hyundai_kia_connect_api.egg-info/top_level.txt +0 -0
  41. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/setup.cfg +0 -0
  42. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/tests/__init__.py +0 -0
  43. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/tests/au_login_test.py +0 -0
  44. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/tests/ca_login_test.py +0 -0
  45. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/tests/eu_check_response_for_errors_test.py +0 -0
  46. {hyundai_kia_connect_api-3.20.2 → hyundai_kia_connect_api-3.20.5}/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.2
3
+ Version: 3.20.5
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
  =======================
@@ -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
 
@@ -629,59 +631,14 @@ 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": {
680
- "airCtrl": options.climate,
681
637
  "airTemp": {
682
638
  "unit": 1,
683
639
  "value": str(options.set_temp),
684
640
  },
641
+ "airCtrl": options.climate,
685
642
  "defrost": options.defrost,
686
643
  "heatingAccessory": {
687
644
  "rearWindow": int(options.heating),
@@ -692,30 +649,84 @@ class KiaUvoAPIUSA(ApiImpl):
692
649
  "unit": 4,
693
650
  "value": options.duration,
694
651
  },
695
- "heatVentSeat": {
696
- "driverSeat": {
697
- "heatVentType": front_left_heatVentType,
698
- "heatVentLevel": front_left_heatVentLevel,
699
- "heatVentStep": 1,
700
- },
701
- "passengerSeat": {
702
- "heatVentType": front_right_heatVentType,
703
- "heatVentLevel": front_right_heatVentLevel,
704
- "heatVentStep": 1,
705
- },
706
- "rearLeftSeat": {
707
- "heatVentType": rear_left_heatVentType,
708
- "heatVentLevel": rear_left_heatVentLevel,
709
- "heatVentStep": 1,
710
- },
711
- "rearRightSeat": {
712
- "heatVentType": rear_right_heatVentType,
713
- "heatVentLevel": rear_right_heatVentLevel,
714
- "heatVentStep": 1,
715
- },
652
+ },
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"] = {
709
+ "driverSeat": {
710
+ "heatVentType": front_left_heatVentType,
711
+ "heatVentLevel": front_left_heatVentLevel,
712
+ "heatVentStep": 1,
713
+ },
714
+ "passengerSeat": {
715
+ "heatVentType": front_right_heatVentType,
716
+ "heatVentLevel": front_right_heatVentLevel,
717
+ "heatVentStep": 1,
718
+ },
719
+ "rearLeftSeat": {
720
+ "heatVentType": rear_left_heatVentType,
721
+ "heatVentLevel": rear_left_heatVentLevel,
722
+ "heatVentStep": 1,
723
+ },
724
+ "rearRightSeat": {
725
+ "heatVentType": rear_right_heatVentType,
726
+ "heatVentLevel": rear_right_heatVentLevel,
727
+ "heatVentStep": 1,
716
728
  },
717
729
  }
718
- }
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
@@ -4,7 +4,6 @@
4
4
  import datetime
5
5
  import re
6
6
 
7
-
8
7
  def get_child_value(data, key):
9
8
  value = data
10
9
  for x in key.split("."):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.20.2
3
+ Version: 3.20.5
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.2",
47
+ version="3.20.5",
48
48
  zip_safe=False,
49
49
  )