carconnectivity-connector-skoda 0.4a5__py3-none-any.whl → 0.4a6__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 carconnectivity-connector-skoda might be problematic. Click here for more details.
- {carconnectivity_connector_skoda-0.4a5.dist-info → carconnectivity_connector_skoda-0.4a6.dist-info}/METADATA +2 -2
- {carconnectivity_connector_skoda-0.4a5.dist-info → carconnectivity_connector_skoda-0.4a6.dist-info}/RECORD +9 -9
- carconnectivity_connectors/skoda/_version.py +1 -1
- carconnectivity_connectors/skoda/command_impl.py +4 -2
- carconnectivity_connectors/skoda/connector.py +2 -8
- carconnectivity_connectors/skoda/mqtt_client.py +7 -1
- {carconnectivity_connector_skoda-0.4a5.dist-info → carconnectivity_connector_skoda-0.4a6.dist-info}/LICENSE +0 -0
- {carconnectivity_connector_skoda-0.4a5.dist-info → carconnectivity_connector_skoda-0.4a6.dist-info}/WHEEL +0 -0
- {carconnectivity_connector_skoda-0.4a5.dist-info → carconnectivity_connector_skoda-0.4a6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: carconnectivity-connector-skoda
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4a6
|
|
4
4
|
Summary: CarConnectivity connector for Skoda services
|
|
5
5
|
Author: Till Steinbach
|
|
6
6
|
License: MIT License
|
|
@@ -37,7 +37,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
37
37
|
Requires-Python: >=3.8
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
License-File: LICENSE
|
|
40
|
-
Requires-Dist: carconnectivity>=0.
|
|
40
|
+
Requires-Dist: carconnectivity>=0.4a10
|
|
41
41
|
Requires-Dist: oauthlib~=3.2.2
|
|
42
42
|
Requires-Dist: requests~=2.32.3
|
|
43
43
|
Requires-Dist: jwt~=1.3.1
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
carconnectivity_connectors/skoda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
carconnectivity_connectors/skoda/_version.py,sha256=
|
|
2
|
+
carconnectivity_connectors/skoda/_version.py,sha256=t6VbDfPweiN2M7qdbMSADJ_WQglcYty7UZiLkw3nIrc,508
|
|
3
3
|
carconnectivity_connectors/skoda/capability.py,sha256=vbAKK8KKre-CndLF6_5qyWLpfa4KZHk1U-hpb6nCL5w,4225
|
|
4
4
|
carconnectivity_connectors/skoda/charging.py,sha256=CoUOYHHUPPPldKQvv0h-qrUsoEtstR3iUx-l0IU5rNM,6798
|
|
5
5
|
carconnectivity_connectors/skoda/climatization.py,sha256=Jut468SkxjPBDTqroWFvDifVPfJBxGjsFed5pc4kZkg,1768
|
|
6
|
-
carconnectivity_connectors/skoda/command_impl.py,sha256=
|
|
7
|
-
carconnectivity_connectors/skoda/connector.py,sha256=
|
|
6
|
+
carconnectivity_connectors/skoda/command_impl.py,sha256=vgno5Qb5To0hCHOEBWSG8UOwCY9kT5fz1e2y0b6zF7U,3047
|
|
7
|
+
carconnectivity_connectors/skoda/connector.py,sha256=o0nZxBvK-keQDeZ3za-mLWEJ3ZWH_E9buBjc1IoA2jk,126502
|
|
8
8
|
carconnectivity_connectors/skoda/error.py,sha256=ffxzvjmci7vtp9Q1K4DR1kBF0kTJxN5Gluci3kDBkEI,2459
|
|
9
|
-
carconnectivity_connectors/skoda/mqtt_client.py,sha256=
|
|
9
|
+
carconnectivity_connectors/skoda/mqtt_client.py,sha256=kJ16_x9hjjIUJM_tcs_gr2FNEdRZFkCjYe4sht7x8vE,38699
|
|
10
10
|
carconnectivity_connectors/skoda/vehicle.py,sha256=TeY3qKWbBfxFxt6UzSDrB-YZ4L8GURAvINzBiFm9Y9E,3819
|
|
11
11
|
carconnectivity_connectors/skoda/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
carconnectivity_connectors/skoda/auth/auth_util.py,sha256=dGLUbUre0HBsTg_Ii5vW34f8DLrCykYJYCyzEvUBBEE,4434
|
|
@@ -16,8 +16,8 @@ carconnectivity_connectors/skoda/auth/session_manager.py,sha256=Uf1vujuDBYUCAXhY
|
|
|
16
16
|
carconnectivity_connectors/skoda/auth/skoda_web_session.py,sha256=tapjCRRPBu3tHrDoKmtuAlQhgxktib3oWTB8MHEzZTY,10816
|
|
17
17
|
carconnectivity_connectors/skoda/auth/helpers/blacklist_retry.py,sha256=f3wsiY5bpHDBxp7Va1Mv9nKJ4u3qnCHZZmDu78_AhMk,1251
|
|
18
18
|
carconnectivity_connectors/skoda/ui/connector_ui.py,sha256=2Gywhyki52IxIZXV6DhWhzrBLn2293LlUMhK1Rxnw9w,1376
|
|
19
|
-
carconnectivity_connector_skoda-0.
|
|
20
|
-
carconnectivity_connector_skoda-0.
|
|
21
|
-
carconnectivity_connector_skoda-0.
|
|
22
|
-
carconnectivity_connector_skoda-0.
|
|
23
|
-
carconnectivity_connector_skoda-0.
|
|
19
|
+
carconnectivity_connector_skoda-0.4a6.dist-info/LICENSE,sha256=PIwI1alwDyOfvEQHdGCm2u9uf_mGE8030xZDfun0xTo,1071
|
|
20
|
+
carconnectivity_connector_skoda-0.4a6.dist-info/METADATA,sha256=_3LSjrx5HrG4915RcpWd6HBFquzFA5pwJDq59axOiqs,5366
|
|
21
|
+
carconnectivity_connector_skoda-0.4a6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
22
|
+
carconnectivity_connector_skoda-0.4a6.dist-info/top_level.txt,sha256=KqA8GviZsDH4PtmnwSQsz0HB_w-TWkeEHLIRNo5dTaI,27
|
|
23
|
+
carconnectivity_connector_skoda-0.4a6.dist-info/RECORD,,
|
|
@@ -31,6 +31,8 @@ class SpinCommand(GenericCommand):
|
|
|
31
31
|
|
|
32
32
|
@value.setter
|
|
33
33
|
def value(self, new_value: Optional[Union[str, Dict]]) -> None:
|
|
34
|
+
# Execute early hooks before parsing the value
|
|
35
|
+
new_value = self._execute_on_set_hook(new_value, early_hook=True)
|
|
34
36
|
if isinstance(new_value, str):
|
|
35
37
|
parser = ThrowingArgumentParser(prog='', add_help=False, exit_on_error=False)
|
|
36
38
|
parser.add_argument('command', help='Command to execute', type=SpinCommand.Command,
|
|
@@ -55,8 +57,8 @@ class SpinCommand(GenericCommand):
|
|
|
55
57
|
raise ValueError('Invalid value for SpinCommand. '
|
|
56
58
|
f'Command must be one of {SpinCommand.Command}')
|
|
57
59
|
if self._is_changeable:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
# Execute late hooks before setting the value
|
|
61
|
+
new_value = self._execute_on_set_hook(new_value, early_hook=False)
|
|
60
62
|
self._set_value(new_value)
|
|
61
63
|
else:
|
|
62
64
|
raise TypeError('You cannot set this attribute. Attribute is not mutable.')
|
|
@@ -83,15 +83,8 @@ class Connector(BaseConnector):
|
|
|
83
83
|
|
|
84
84
|
self.connected: BooleanAttribute = BooleanAttribute(name="connected", parent=self, tags={'connector_custom'})
|
|
85
85
|
self.interval: DurationAttribute = DurationAttribute(name="interval", parent=self, tags={'connector_custom'})
|
|
86
|
-
|
|
87
|
-
def __check_interval(attribute: GenericAttribute, value: Any) -> Any:
|
|
88
|
-
del attribute
|
|
89
|
-
if value is not None and value < timedelta(seconds=180):
|
|
90
|
-
raise ValueError('Intervall must be at least 180 seconds')
|
|
91
|
-
return value
|
|
92
|
-
|
|
86
|
+
self.interval.minimum = timedelta(seconds=180)
|
|
93
87
|
self.interval._is_changeable = True # pylint: disable=protected-access
|
|
94
|
-
self.interval._add_on_set_hook(__check_interval) # pylint: disable=protected-access
|
|
95
88
|
|
|
96
89
|
self.commands: Commands = Commands(parent=self)
|
|
97
90
|
|
|
@@ -369,6 +362,7 @@ class Connector(BaseConnector):
|
|
|
369
362
|
if vehicle_to_update.capabilities.has_capability('VEHICLE_HEALTH_INSPECTION'):
|
|
370
363
|
vehicle_to_update = self.fetch_maintenance(vehicle_to_update)
|
|
371
364
|
vehicle_to_update = self.decide_state(vehicle_to_update)
|
|
365
|
+
self.car_connectivity.transaction_end()
|
|
372
366
|
|
|
373
367
|
def decide_state(self, vehicle: SkodaVehicle) -> SkodaVehicle:
|
|
374
368
|
"""
|
|
@@ -469,7 +469,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
469
469
|
if 'data' in data and data['data'] is not None:
|
|
470
470
|
vehicle: Optional[GenericVehicle] = self._skoda_connector.car_connectivity.garage.get_vehicle(vin)
|
|
471
471
|
if isinstance(vehicle, SkodaElectricVehicle):
|
|
472
|
-
electric_drive: ElectricDrive = vehicle.get_electric_drive()
|
|
472
|
+
electric_drive: Optional[ElectricDrive] = vehicle.get_electric_drive()
|
|
473
473
|
if electric_drive is not None:
|
|
474
474
|
charging_state: Optional[Charging.ChargingState] = vehicle.charging.state.value
|
|
475
475
|
old_charging_state: Optional[Charging.ChargingState] = charging_state
|
|
@@ -509,6 +509,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
509
509
|
if old_charging_state != charging_state:
|
|
510
510
|
try:
|
|
511
511
|
self._skoda_connector.fetch_charging(vehicle, no_cache=True)
|
|
512
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
512
513
|
except CarConnectivityError as e:
|
|
513
514
|
LOG.error('Error while fetching charging: %s', e)
|
|
514
515
|
if 'timeToFinish' in data['data'] and data['data']['timeToFinish'] is not None \
|
|
@@ -536,6 +537,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
536
537
|
if isinstance(vehicle, SkodaVehicle):
|
|
537
538
|
try:
|
|
538
539
|
self._skoda_connector.fetch_air_conditioning(vehicle, no_cache=True)
|
|
540
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
539
541
|
except CarConnectivityError as e:
|
|
540
542
|
LOG.error('Error while fetching air conditioning: %s', e)
|
|
541
543
|
elif 'name' in data and data['name'] == 'climatisation-completed':
|
|
@@ -582,6 +584,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
582
584
|
self._skoda_connector.fetch_air_conditioning(vehicle, no_cache=True)
|
|
583
585
|
except CarConnectivityError as e:
|
|
584
586
|
LOG.error('Error while fetching air conditioning: %s', e)
|
|
587
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
585
588
|
|
|
586
589
|
if vin in self.delayed_access_function_timers:
|
|
587
590
|
self.delayed_access_function_timers[vin].cancel()
|
|
@@ -598,6 +601,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
598
601
|
if isinstance(vehicle, SkodaVehicle):
|
|
599
602
|
try:
|
|
600
603
|
self._skoda_connector.fetch_vehicle_status(vehicle, no_cache=True)
|
|
604
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
601
605
|
except CarConnectivityError as e:
|
|
602
606
|
LOG.error('Error while fetching vehicle status: %s', e)
|
|
603
607
|
|
|
@@ -629,6 +633,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
629
633
|
LOG.debug('Received %s operation request for vehicle %s from user %s', operation_request, vin, user_id)
|
|
630
634
|
try:
|
|
631
635
|
self._skoda_connector.fetch_air_conditioning(vehicle, no_cache=True)
|
|
636
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
632
637
|
except CarConnectivityError as e:
|
|
633
638
|
LOG.error('Error while fetching air-conditioning: %s', e)
|
|
634
639
|
return
|
|
@@ -649,6 +654,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
649
654
|
LOG.debug('Received %s operation request for vehicle %s from user %s', operation_request, vin, user_id)
|
|
650
655
|
try:
|
|
651
656
|
self._skoda_connector.fetch_charging(vehicle, no_cache=True)
|
|
657
|
+
self._skoda_connector.car_connectivity.transaction_end()
|
|
652
658
|
except CarConnectivityError as e:
|
|
653
659
|
LOG.error('Error while fetching charging: %s', e)
|
|
654
660
|
return
|
|
File without changes
|
|
File without changes
|
|
File without changes
|