hyundai-kia-connect-api 3.29.1__tar.gz → 3.29.2__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 (48) hide show
  1. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/PKG-INFO +1 -1
  2. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/KiaUvoApiUSA.py +57 -65
  3. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/PKG-INFO +1 -1
  4. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/setup.py +1 -1
  5. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/AUTHORS.rst +0 -0
  6. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/CONTRIBUTING.rst +0 -0
  7. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/HISTORY.rst +0 -0
  8. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/LICENSE +0 -0
  9. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/MANIFEST.in +0 -0
  10. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/README.rst +0 -0
  11. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/Makefile +0 -0
  12. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/authors.rst +0 -0
  13. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/conf.py +0 -0
  14. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/contributing.rst +0 -0
  15. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/history.rst +0 -0
  16. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/index.rst +0 -0
  17. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/installation.rst +0 -0
  18. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/make.bat +0 -0
  19. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/readme.rst +0 -0
  20. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/docs/usage.rst +0 -0
  21. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/ApiImpl.py +0 -0
  22. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/ApiImplType1.py +0 -0
  23. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/HyundaiBlueLinkApiUSA.py +0 -0
  24. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/KiaUvoApiAU.py +0 -0
  25. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/KiaUvoApiCA.py +0 -0
  26. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/KiaUvoApiCN.py +0 -0
  27. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/KiaUvoApiEU.py +0 -0
  28. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/Token.py +0 -0
  29. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/Vehicle.py +0 -0
  30. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/VehicleManager.py +0 -0
  31. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/__init__.py +0 -0
  32. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/bluelink.py +0 -0
  33. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/const.py +0 -0
  34. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/exceptions.py +0 -0
  35. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api/utils.py +0 -0
  36. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/SOURCES.txt +0 -0
  37. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/dependency_links.txt +0 -0
  38. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/entry_points.txt +0 -0
  39. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/not-zip-safe +0 -0
  40. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/requires.txt +0 -0
  41. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/hyundai_kia_connect_api.egg-info/top_level.txt +0 -0
  42. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/requirements.txt +0 -0
  43. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/setup.cfg +0 -0
  44. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/tests/__init__.py +0 -0
  45. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/tests/au_login_test.py +0 -0
  46. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/tests/ca_login_test.py +0 -0
  47. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/tests/eu_check_response_for_errors_test.py +0 -0
  48. {hyundai_kia_connect_api-3.29.1 → hyundai_kia_connect_api-3.29.2}/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.29.1
3
+ Version: 3.29.2
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
@@ -620,6 +620,59 @@ class KiaUvoApiUSA(ApiImpl):
620
620
 
621
621
  return response.headers["Xid"]
622
622
 
623
+ def _seat_settings(self, level) -> dict:
624
+ # See const.SEAT_STATUS for the list and descriptions of levels.
625
+ #
626
+ # The values were determined empirically, see https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/718
627
+ if level == 8: # High heat
628
+ return {
629
+ "heatVentType": 1,
630
+ "heatVentLevel": 4,
631
+ "heatVentStep": 1,
632
+ }
633
+ elif level == 7: # Medium heat
634
+ return {
635
+ "heatVentType": 1,
636
+ "heatVentLevel": 3,
637
+ "heatVentStep": 2,
638
+ }
639
+ elif level == 6: # Low heat
640
+ return {
641
+ "heatVentType": 1,
642
+ "heatVentLevel": 2,
643
+ "heatVentStep": 3,
644
+ }
645
+ elif level == 5: # High cool
646
+ return {
647
+ "heatVentType": 2,
648
+ "heatVentLevel": 4,
649
+ "heatVentStep": 1,
650
+ }
651
+ elif level == 4: # Medium cool
652
+ return {
653
+ "heatVentType": 2,
654
+ "heatVentLevel": 3,
655
+ "heatVentStep": 2,
656
+ }
657
+ elif level == 3: # Low cool
658
+ return {
659
+ "heatVentType": 2,
660
+ "heatVentLevel": 2,
661
+ "heatVentStep": 3,
662
+ }
663
+ elif level == 1: # Generically on, let's assume high heat
664
+ return {
665
+ "heatVentType": 1,
666
+ "heatVentLevel": 4,
667
+ "heatVentStep": 1,
668
+ }
669
+ else: # Off
670
+ return {
671
+ "heatVentType": 0,
672
+ "heatVentLevel": 1,
673
+ "heatVentStep": 0,
674
+ }
675
+
623
676
  def start_climate(
624
677
  self, token: Token, vehicle: Vehicle, options: ClimateRequestOptions
625
678
  ) -> str:
@@ -668,72 +721,11 @@ class KiaUvoApiUSA(ApiImpl):
668
721
  or options.rear_left_seat is not None
669
722
  or options.rear_right_seat is not None
670
723
  ):
671
- if options.front_left_seat is None:
672
- options.front_left_seat = 0
673
- if options.front_right_seat is None:
674
- options.front_right_seat = 0
675
- if options.rear_left_seat is None:
676
- options.rear_left_seat = 0
677
- if options.rear_right_seat is None:
678
- options.rear_right_seat = 0
679
-
680
- front_left_heatVentType = 0
681
- front_right_heatVentType = 0
682
- rear_left_heatVentType = 0
683
- rear_right_heatVentType = 0
684
- front_left_heatVentLevel = 0
685
- front_right_heatVentLevel = 0
686
- rear_left_heatVentLevel = 0
687
- rear_right_heatVentLevel = 0
688
-
689
- # heated
690
- if options.front_left_seat in (6, 7, 8):
691
- front_left_heatVentType = 1
692
- front_left_heatVentLevel = options.front_left_seat - 4
693
- if options.front_right_seat in (6, 7, 8):
694
- front_right_heatVentType = 1
695
- front_right_heatVentLevel = options.front_right_seat - 4
696
- if options.rear_left_seat in (6, 7, 8):
697
- rear_left_heatVentType = 1
698
- rear_left_heatVentLevel = options.rear_left_seat - 4
699
- if options.rear_right_seat in (6, 7, 8):
700
- rear_right_heatVentType = 1
701
- rear_right_heatVentLevel = options.rear_right_seat - 4
702
-
703
- # ventilated
704
- if options.front_left_seat in (3, 4, 5):
705
- front_left_heatVentType = 2
706
- front_left_heatVentLevel = options.front_left_seat - 1
707
- if options.front_right_seat in (3, 4, 5):
708
- front_right_heatVentType = 2
709
- front_right_heatVentLevel = options.front_right_seat - 1
710
- if options.rear_left_seat in (3, 4, 5):
711
- rear_left_heatVentType = 2
712
- rear_left_heatVentLevel = options.rear_left_seat - 1
713
- if options.rear_right_seat in (3, 4, 5):
714
- rear_right_heatVentType = 2
715
- rear_right_heatVentLevel = options.rear_right_seat - 1
716
724
  body["remoteClimate"]["heatVentSeat"] = {
717
- "driverSeat": {
718
- "heatVentType": front_left_heatVentType,
719
- "heatVentLevel": front_left_heatVentLevel,
720
- "heatVentStep": 1,
721
- },
722
- "passengerSeat": {
723
- "heatVentType": front_right_heatVentType,
724
- "heatVentLevel": front_right_heatVentLevel,
725
- "heatVentStep": 1,
726
- },
727
- "rearLeftSeat": {
728
- "heatVentType": rear_left_heatVentType,
729
- "heatVentLevel": rear_left_heatVentLevel,
730
- "heatVentStep": 1,
731
- },
732
- "rearRightSeat": {
733
- "heatVentType": rear_right_heatVentType,
734
- "heatVentLevel": rear_right_heatVentLevel,
735
- "heatVentStep": 1,
736
- },
725
+ "driverSeat": self._seat_settings(options.front_left_seat),
726
+ "passengerSeat": self._seat_settings(options.front_right_seat),
727
+ "rearLeftSeat": self._seat_settings(options.rear_left_seat),
728
+ "rearRightSeat": self._seat_settings(options.rear_right_seat),
737
729
  }
738
730
  _LOGGER.debug(f"{DOMAIN} - Planned start_climate payload: {body}")
739
731
  response = self.post_request_with_logging_and_active_session(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.29.1
3
+ Version: 3.29.2
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
@@ -47,6 +47,6 @@ setup(
47
47
  test_suite="tests",
48
48
  tests_require=test_requirements,
49
49
  url="https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api",
50
- version="3.29.1",
50
+ version="3.29.2",
51
51
  zip_safe=False,
52
52
  )