myvsb-developer-api 0.1.4__tar.gz → 0.2.0__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.
- {myvsb_developer_api-0.1.4/src/myvsb_developer_api.egg-info → myvsb_developer_api-0.2.0}/PKG-INFO +1 -1
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/pyproject.toml +1 -1
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/open_api_client.py +15 -1
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/rest_api.py +26 -0
- myvsb_developer_api-0.2.0/src/myskoda_openapi/models/charging_profiles.py +46 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/driving_range.py +1 -1
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/vehicle.py +4 -2
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0/src/myvsb_developer_api.egg-info}/PKG-INFO +1 -1
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myvsb_developer_api.egg-info/SOURCES.txt +1 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/LICENSE +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/README.md +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/setup.cfg +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/const.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/exceptions.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/utils.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/active_ventilation.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/air_conditioning.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/auxiliary_heating.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/base_model.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/charging.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/common.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/enums.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/parking_position.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/vehicle_status.py +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myvsb_developer_api.egg-info/dependency_links.txt +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myvsb_developer_api.egg-info/requires.txt +0 -0
- {myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myvsb_developer_api.egg-info/top_level.txt +0 -0
{myvsb_developer_api-0.1.4/src/myvsb_developer_api.egg-info → myvsb_developer_api-0.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: myvsb-developer-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Asynchronous Python library for the MyVSB Developer API
|
|
5
5
|
Author-email: net0045 <stepan.netolicky@vsb.cz>
|
|
6
6
|
Project-URL: Homepage, https://github.com/mobility-lab-vsb/myvsb-developer-api
|
|
@@ -9,6 +9,8 @@ from ..models.air_conditioning import AirConditioning
|
|
|
9
9
|
from ..models.parking_position import ParkingPosition
|
|
10
10
|
from ..models.auxiliary_heating import AuxiliaryHeating
|
|
11
11
|
from ..models.charging import Charging
|
|
12
|
+
from ..models.driving_range import FuelStatus
|
|
13
|
+
from ..models.charging_profiles import ChargingProfiles
|
|
12
14
|
|
|
13
15
|
class OpenAPIClient:
|
|
14
16
|
"""Client for interacting with rest API and used in HomeAssistant."""
|
|
@@ -52,9 +54,21 @@ class OpenAPIClient:
|
|
|
52
54
|
return endpoint_result.result
|
|
53
55
|
|
|
54
56
|
async def get_active_ventilation(self, vin: str) -> ActiveVentilation:
|
|
55
|
-
"""Get the actual
|
|
57
|
+
"""Get the actual active ventilation and return the parsed Pydantic model."""
|
|
56
58
|
endpoint_result = await self.rest_api.get_active_ventilation(vin)
|
|
57
59
|
return endpoint_result.result
|
|
60
|
+
|
|
61
|
+
async def get_fuel_status(self, vin: str) -> FuelStatus:
|
|
62
|
+
"""Get the actual fuel status and return the parsed Pydantic model."""
|
|
63
|
+
endpoint_result = await self.rest_api.get_fuel_status(vin)
|
|
64
|
+
return endpoint_result.result
|
|
65
|
+
|
|
66
|
+
async def get_charging_profiles(self, vin: str) -> ChargingProfiles:
|
|
67
|
+
"""Get the actual charging profiles and return the parsed Pydantic model."""
|
|
68
|
+
endpoint_result = await self.rest_api.get_charging_profiles(vin)
|
|
69
|
+
return endpoint_result.result
|
|
70
|
+
|
|
71
|
+
|
|
58
72
|
|
|
59
73
|
async def start_air_conditioning(self, vin: str, temperature: float) -> None:
|
|
60
74
|
"""Starts the air conditioning for the vehicle with the given VIN."""
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/rest_api.py
RENAMED
|
@@ -12,6 +12,8 @@ from ..models.parking_position import ParkingPosition
|
|
|
12
12
|
from ..models.auxiliary_heating import AuxiliaryHeating
|
|
13
13
|
from ..models.charging import Charging
|
|
14
14
|
from ..models.active_ventilation import ActiveVentilation
|
|
15
|
+
from ..models.charging_profiles import ChargingProfiles
|
|
16
|
+
from ..models.driving_range import FuelStatus
|
|
15
17
|
from .exceptions import (
|
|
16
18
|
OpenApiError,
|
|
17
19
|
OpenApiAuthenticationError,
|
|
@@ -194,6 +196,30 @@ class SkodaRestAPI:
|
|
|
194
196
|
status_model = full_response.vehicle.active_ventilation
|
|
195
197
|
|
|
196
198
|
return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
|
|
199
|
+
|
|
200
|
+
async def get_charging_profiles(self, vin: str) -> GetEndpointResult[Optional[ChargingProfiles]]:
|
|
201
|
+
"""Retrieve ONLY the vehicle charging profiles object by filtering via the 'include' parameter."""
|
|
202
|
+
url = f"/api/v1/vehicles/{vin}"
|
|
203
|
+
params = {"include": "chargingProfiles"}
|
|
204
|
+
|
|
205
|
+
raw_json = await self._make_get_request(url, params=params)
|
|
206
|
+
|
|
207
|
+
full_response = VehicleResponse.model_validate(raw_json)
|
|
208
|
+
status_model = full_response.vehicle.charging_profiles
|
|
209
|
+
|
|
210
|
+
return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
|
|
211
|
+
|
|
212
|
+
async def get_fuel_status(self, vin: str) -> GetEndpointResult[Optional[FuelStatus]]:
|
|
213
|
+
"""Retrieve ONLY the vehicle fuel status object by filtering via the 'include' parameter."""
|
|
214
|
+
url = f"/api/v1/vehicles/{vin}"
|
|
215
|
+
params = {"include": "fuelStatus"}
|
|
216
|
+
|
|
217
|
+
raw_json = await self._make_get_request(url, params=params)
|
|
218
|
+
|
|
219
|
+
full_response = VehicleResponse.model_validate(raw_json)
|
|
220
|
+
status_model = full_response.vehicle.fuel_status
|
|
221
|
+
|
|
222
|
+
return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
|
|
197
223
|
|
|
198
224
|
# =========================================================================
|
|
199
225
|
# ENDPOINT METHODS - POST
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from .base_model import BaseModel
|
|
4
|
+
|
|
5
|
+
class Timer(BaseModel):
|
|
6
|
+
"""Details of the profiles timer."""
|
|
7
|
+
id: int
|
|
8
|
+
enabled: bool
|
|
9
|
+
time: Optional[str] = None
|
|
10
|
+
type: str
|
|
11
|
+
one_off_day: Optional[str] = None
|
|
12
|
+
recurring_on: Optional[List[str]] = None
|
|
13
|
+
|
|
14
|
+
class ChargingTime(BaseModel):
|
|
15
|
+
"""Details of the profiles' charging time."""
|
|
16
|
+
id: int
|
|
17
|
+
enabled: bool
|
|
18
|
+
start_time: str
|
|
19
|
+
end_time: str
|
|
20
|
+
|
|
21
|
+
class MinBatteryStateOfCharge(BaseModel):
|
|
22
|
+
"""Details of the minimum battery state of charge."""
|
|
23
|
+
enabled: Optional[bool] = None
|
|
24
|
+
minimum_battery_state_of_charge_in_percent: Optional[int] = None
|
|
25
|
+
|
|
26
|
+
class ChargingProfileSettings(BaseModel):
|
|
27
|
+
"""Details of the charging profile settings."""
|
|
28
|
+
max_charging_current: Optional[str] = None
|
|
29
|
+
min_battery_state_of_charge: Optional[MinBatteryStateOfCharge] = None
|
|
30
|
+
target_state_of_charge_in_percent: Optional[int] = None
|
|
31
|
+
auto_unlock_plug_when_charged: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
class ChargingProfile(BaseModel):
|
|
34
|
+
"""Details of the vehicle's charging profile."""
|
|
35
|
+
id: int
|
|
36
|
+
name: str
|
|
37
|
+
settings: ChargingProfileSettings
|
|
38
|
+
preferredChargingTimes: List[ChargingTime]
|
|
39
|
+
timers: List[Timer]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ChargingProfiles(BaseModel):
|
|
43
|
+
"""Details of the vehicle's charging profiles."""
|
|
44
|
+
profiles: List[ChargingProfile]
|
|
45
|
+
current_vehicle_position_profile: Optional[ChargingProfile] = None
|
|
46
|
+
car_captured_timestamp: Optional[str] = None
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/driving_range.py
RENAMED
|
@@ -11,7 +11,7 @@ class EngineRange(BaseModel):
|
|
|
11
11
|
remaining_range_in_km: Optional[int] = None
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class FuelStatus(BaseModel):
|
|
15
15
|
"""Details of the vehicle's fuel status and driving range."""
|
|
16
16
|
car_type: Optional[str] = None
|
|
17
17
|
ad_blue_range: Optional[int] = None
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/vehicle.py
RENAMED
|
@@ -10,8 +10,9 @@ from .parking_position import ParkingPosition
|
|
|
10
10
|
from .auxiliary_heating import AuxiliaryHeating
|
|
11
11
|
from .active_ventilation import ActiveVentilation
|
|
12
12
|
from .charging import Charging
|
|
13
|
-
from .driving_range import
|
|
13
|
+
from .driving_range import FuelStatus
|
|
14
14
|
from .air_conditioning import AirConditioning
|
|
15
|
+
from .charging_profiles import ChargingProfiles
|
|
15
16
|
|
|
16
17
|
class Odometer(BaseModel):
|
|
17
18
|
"""Odometer of the vehicle."""
|
|
@@ -30,8 +31,9 @@ class VehicleObject(BaseModel):
|
|
|
30
31
|
auxiliary_heating: Optional[AuxiliaryHeating] = None
|
|
31
32
|
active_ventilation: Optional[ActiveVentilation] = None
|
|
32
33
|
air_conditioning: Optional[AirConditioning] = None
|
|
33
|
-
|
|
34
|
+
fuel_status: Optional[FuelStatus] = None
|
|
34
35
|
charging: Optional[Charging] = None
|
|
36
|
+
charging_profiles: Optional[ChargingProfiles] = None
|
|
35
37
|
|
|
36
38
|
class VehicleResponse(BaseModel):
|
|
37
39
|
"""Response object for vehicle data."""
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0/src/myvsb_developer_api.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: myvsb-developer-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Asynchronous Python library for the MyVSB Developer API
|
|
5
5
|
Author-email: net0045 <stepan.netolicky@vsb.cz>
|
|
6
6
|
Project-URL: Homepage, https://github.com/mobility-lab-vsb/myvsb-developer-api
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myvsb_developer_api.egg-info/SOURCES.txt
RENAMED
|
@@ -11,6 +11,7 @@ src/myskoda_openapi/models/air_conditioning.py
|
|
|
11
11
|
src/myskoda_openapi/models/auxiliary_heating.py
|
|
12
12
|
src/myskoda_openapi/models/base_model.py
|
|
13
13
|
src/myskoda_openapi/models/charging.py
|
|
14
|
+
src/myskoda_openapi/models/charging_profiles.py
|
|
14
15
|
src/myskoda_openapi/models/common.py
|
|
15
16
|
src/myskoda_openapi/models/driving_range.py
|
|
16
17
|
src/myskoda_openapi/models/enums.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/const.py
RENAMED
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/exceptions.py
RENAMED
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/api_layer/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/base_model.py
RENAMED
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/charging.py
RENAMED
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{myvsb_developer_api-0.1.4 → myvsb_developer_api-0.2.0}/src/myskoda_openapi/models/vehicle_status.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|