carconnectivity-connector-skoda 0.1__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.1.dist-info/LICENSE +21 -0
- carconnectivity_connector_skoda-0.1.dist-info/METADATA +123 -0
- carconnectivity_connector_skoda-0.1.dist-info/RECORD +22 -0
- carconnectivity_connector_skoda-0.1.dist-info/WHEEL +5 -0
- carconnectivity_connector_skoda-0.1.dist-info/top_level.txt +1 -0
- carconnectivity_connectors/skoda/__init__.py +0 -0
- carconnectivity_connectors/skoda/_version.py +16 -0
- carconnectivity_connectors/skoda/auth/__init__.py +0 -0
- carconnectivity_connectors/skoda/auth/auth_util.py +141 -0
- carconnectivity_connectors/skoda/auth/helpers/blacklist_retry.py +29 -0
- carconnectivity_connectors/skoda/auth/my_skoda_session.py +224 -0
- carconnectivity_connectors/skoda/auth/openid_session.py +449 -0
- carconnectivity_connectors/skoda/auth/session_manager.py +82 -0
- carconnectivity_connectors/skoda/auth/skoda_web_session.py +239 -0
- carconnectivity_connectors/skoda/capability.py +135 -0
- carconnectivity_connectors/skoda/charging.py +137 -0
- carconnectivity_connectors/skoda/climatization.py +41 -0
- carconnectivity_connectors/skoda/command_impl.py +74 -0
- carconnectivity_connectors/skoda/connector.py +1624 -0
- carconnectivity_connectors/skoda/error.py +53 -0
- carconnectivity_connectors/skoda/mqtt_client.py +655 -0
- carconnectivity_connectors/skoda/vehicle.py +70 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Module for vehicle classes."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from carconnectivity.vehicle import GenericVehicle, ElectricVehicle, CombustionVehicle, HybridVehicle
|
|
6
|
+
from carconnectivity.charging import Charging
|
|
7
|
+
|
|
8
|
+
from carconnectivity_connectors.skoda.capability import Capabilities
|
|
9
|
+
from carconnectivity_connectors.skoda.charging import SkodaCharging
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from typing import Optional
|
|
13
|
+
from carconnectivity.garage import Garage
|
|
14
|
+
from carconnectivity_connectors.base.connector import BaseConnector
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkodaVehicle(GenericVehicle): # pylint: disable=too-many-instance-attributes
|
|
18
|
+
"""
|
|
19
|
+
A class to represent a generic Skoda vehicle.
|
|
20
|
+
"""
|
|
21
|
+
def __init__(self, vin: Optional[str] = None, garage: Optional[Garage] = None, managing_connector: Optional[BaseConnector] = None,
|
|
22
|
+
origin: Optional[SkodaVehicle] = None) -> None:
|
|
23
|
+
if origin is not None:
|
|
24
|
+
super().__init__(origin=origin)
|
|
25
|
+
self.capabilities: Capabilities = origin.capabilities
|
|
26
|
+
self.capabilities.parent = self
|
|
27
|
+
else:
|
|
28
|
+
super().__init__(vin=vin, garage=garage, managing_connector=managing_connector)
|
|
29
|
+
self.capabilities = Capabilities(vehicle=self)
|
|
30
|
+
self.manufacturer._set_value(value='Škoda') # pylint: disable=protected-access
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SkodaElectricVehicle(ElectricVehicle, SkodaVehicle):
|
|
34
|
+
"""
|
|
35
|
+
Represents a Skoda electric vehicle.
|
|
36
|
+
"""
|
|
37
|
+
def __init__(self, vin: Optional[str] = None, garage: Optional[Garage] = None, managing_connector: Optional[BaseConnector] = None,
|
|
38
|
+
origin: Optional[SkodaVehicle] = None) -> None:
|
|
39
|
+
if origin is not None:
|
|
40
|
+
super().__init__(origin=origin)
|
|
41
|
+
if isinstance(origin, ElectricVehicle):
|
|
42
|
+
self.charging: Charging = SkodaCharging(origin=origin.charging)
|
|
43
|
+
self.charging.parent = self
|
|
44
|
+
else:
|
|
45
|
+
super().__init__(vin=vin, garage=garage, managing_connector=managing_connector)
|
|
46
|
+
self.charging: Charging = SkodaCharging(vehicle=self)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class SkodaCombustionVehicle(CombustionVehicle, SkodaVehicle):
|
|
50
|
+
"""
|
|
51
|
+
Represents a Skoda combustion vehicle.
|
|
52
|
+
"""
|
|
53
|
+
def __init__(self, vin: Optional[str] = None, garage: Optional[Garage] = None, managing_connector: Optional[BaseConnector] = None,
|
|
54
|
+
origin: Optional[SkodaVehicle] = None) -> None:
|
|
55
|
+
if origin is not None:
|
|
56
|
+
super().__init__(origin=origin)
|
|
57
|
+
else:
|
|
58
|
+
super().__init__(vin=vin, garage=garage, managing_connector=managing_connector)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class SkodaHybridVehicle(HybridVehicle, SkodaVehicle):
|
|
62
|
+
"""
|
|
63
|
+
Represents a Skoda hybrid vehicle.
|
|
64
|
+
"""
|
|
65
|
+
def __init__(self, vin: Optional[str] = None, garage: Optional[Garage] = None, managing_connector: Optional[BaseConnector] = None,
|
|
66
|
+
origin: Optional[SkodaVehicle] = None) -> None:
|
|
67
|
+
if origin is not None:
|
|
68
|
+
super().__init__(origin=origin)
|
|
69
|
+
else:
|
|
70
|
+
super().__init__(vin=vin, garage=garage, managing_connector=managing_connector)
|