pycupra 0.0.14__py3-none-any.whl → 0.0.15__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.
pycupra/__version__.py CHANGED
@@ -3,4 +3,4 @@ pycupra - A Python 3 library for interacting with the My Cupra/My Seat portal.
3
3
 
4
4
  For more details and documentation, visit the github page at https://github.com/WulfgarW/pycupra
5
5
  """
6
- __version__ = "0.0.14"
6
+ __version__ = "0.0.15"
pycupra/dashboard.py CHANGED
@@ -715,6 +715,32 @@ class PHeaterVentilation(Switch):
715
715
  return dict(last_result = self.vehicle.pheater_action_status)
716
716
 
717
717
 
718
+ class SlowCharge(Switch):
719
+ def __init__(self):
720
+ super().__init__(attr="slow_charge", name="Slow charge", icon="mdi:battery")
721
+
722
+ @property
723
+ def state(self):
724
+ return self.vehicle.slow_charge
725
+
726
+ async def turn_on(self):
727
+ await self.vehicle.set_charger_current('reduced')
728
+ #await self.vehicle.update()
729
+
730
+ async def turn_off(self):
731
+ await self.vehicle.set_charger_current('maximum')
732
+ #await self.vehicle.update()
733
+
734
+ @property
735
+ def assumed_state(self):
736
+ return False
737
+
738
+
739
+ @property
740
+ def attributes(self):
741
+ return dict(last_result = self.vehicle.charger_action_status)
742
+
743
+
718
744
  class Warnings(Sensor):
719
745
  def __init__(self):
720
746
  super().__init__(attr="warnings", name="Warnings", icon="mdi:alarm-light")
@@ -981,6 +1007,7 @@ def create_instruments():
981
1007
  #CombustionClimatisationClimate(),
982
1008
  Charging(),
983
1009
  Warnings(),
1010
+ SlowCharge(),
984
1011
  RequestResults(),
985
1012
  DepartureTimer1(),
986
1013
  DepartureTimer2(),
pycupra/vehicle.py CHANGED
@@ -1565,6 +1565,21 @@ class Vehicle:
1565
1565
  return True
1566
1566
  return False
1567
1567
 
1568
+ @property
1569
+ def slow_charge(self):
1570
+ """Return charger max ampere setting."""
1571
+ if self.charge_max_ampere=='reduced':
1572
+ return True
1573
+ return False
1574
+
1575
+ @property
1576
+ def is_slow_charge_supported(self):
1577
+ """Return true if Slow Charge is supported"""
1578
+ if self.is_charge_max_ampere_supported:
1579
+ if self.charge_max_ampere in ('reduced', 'maximum'):
1580
+ return True
1581
+ return False
1582
+
1568
1583
  @property
1569
1584
  def charging_cable_locked(self):
1570
1585
  """Return plug locked state"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycupra
3
- Version: 0.0.14
3
+ Version: 0.0.15
4
4
  Summary: A library to read and send vehicle data via Cupra/Seat portal using the same API calls as the MyCupra/MySeat mobile app.
5
5
  Home-page: https://github.com/WulfgarW/pycupra
6
6
  Author: WulfgarW
@@ -0,0 +1,13 @@
1
+ pycupra/__init__.py,sha256=VPzUfKd5mBFD1UERNV61FbGHih5dQPupLgIfYtmIUi4,230
2
+ pycupra/__version__.py,sha256=TaiHHyrm9YZkkLYWZtVPPNSF68UvwKMIg0DY3rZCtfQ,208
3
+ pycupra/connection.py,sha256=0SA-2UcL_uJhKMfluzyw_N4ZCqmsNEg3jU18XacMm5w,82641
4
+ pycupra/const.py,sha256=mgl29DcZz_J5hSzxknteu0ocDOXmQAgP0x17kvVSSi0,10234
5
+ pycupra/dashboard.py,sha256=GNMBVJx-iF2vtmOpCJQBcyVBsKBxa049KfZDuQaimJs,43497
6
+ pycupra/exceptions.py,sha256=Nq_F79GP8wjHf5lpvPy9TbSIrRHAJrFMo0T1N9TcgSQ,2917
7
+ pycupra/utilities.py,sha256=cH4MiIzT2WlHgmnl_E7rR0R5LvCXfDNvirJolct50V8,2563
8
+ pycupra/vehicle.py,sha256=dTAFaANVzXp05d3kMd8bgDmzzD-kD8Rdywdi96aG63c,135973
9
+ pycupra-0.0.15.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
10
+ pycupra-0.0.15.dist-info/METADATA,sha256=-gVU6f2phktNe1sqg4nD-h-x-iXY3z-ZdjsSz6X5oBU,2579
11
+ pycupra-0.0.15.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
12
+ pycupra-0.0.15.dist-info/top_level.txt,sha256=9Lbj_jG4JvpGwt6K3AwhWFc0XieDnuHFOP4x44wSXSQ,8
13
+ pycupra-0.0.15.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- pycupra/__init__.py,sha256=VPzUfKd5mBFD1UERNV61FbGHih5dQPupLgIfYtmIUi4,230
2
- pycupra/__version__.py,sha256=qY5o8F0qE8xC3RpWzlzulBbikrc7tq6TO-V5LlAJV5s,208
3
- pycupra/connection.py,sha256=0SA-2UcL_uJhKMfluzyw_N4ZCqmsNEg3jU18XacMm5w,82641
4
- pycupra/const.py,sha256=mgl29DcZz_J5hSzxknteu0ocDOXmQAgP0x17kvVSSi0,10234
5
- pycupra/dashboard.py,sha256=3f4yBBBOMrXGiLdjO-2-1Ts2BVuQBw0wKa-2bhwid0c,42807
6
- pycupra/exceptions.py,sha256=Nq_F79GP8wjHf5lpvPy9TbSIrRHAJrFMo0T1N9TcgSQ,2917
7
- pycupra/utilities.py,sha256=cH4MiIzT2WlHgmnl_E7rR0R5LvCXfDNvirJolct50V8,2563
8
- pycupra/vehicle.py,sha256=W1pQ8IkEmirSY6nha9OwSDFJyE2fcPGgeO_cVZAhgqg,135505
9
- pycupra-0.0.14.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
10
- pycupra-0.0.14.dist-info/METADATA,sha256=9txUYXQVhWep4acCAthlWizfMKKy19BCaiLPCdg0Wdk,2579
11
- pycupra-0.0.14.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
12
- pycupra-0.0.14.dist-info/top_level.txt,sha256=9Lbj_jG4JvpGwt6K3AwhWFc0XieDnuHFOP4x44wSXSQ,8
13
- pycupra-0.0.14.dist-info/RECORD,,