tesla-fleet-api 0.8.5__tar.gz → 0.9.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {tesla_fleet_api-0.8.5/tesla_fleet_api.egg-info → tesla_fleet_api-0.9.0}/PKG-INFO +1 -1
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/setup.py +1 -1
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/const.py +4 -1
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/teslemetry.py +20 -9
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/vehicle.py +1 -1
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0/tesla_fleet_api.egg-info}/PKG-INFO +1 -1
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/LICENSE +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/README.md +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/setup.cfg +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/__init__.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/charging.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/energy.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/energyspecific.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/exceptions.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/partner.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/__init__.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/__init__.pyi +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/car_server_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/common_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/errors_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/keys_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/signatures_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/universal_message_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/vcsec_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/vehicle_pb2.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/ratecalculator.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/teslafleetapi.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/teslafleetoauth.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/teslafleetopensource.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/tessie.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/user.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/vehiclesigned.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/vehiclespecific.py +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api.egg-info/SOURCES.txt +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api.egg-info/dependency_links.txt +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api.egg-info/requires.txt +0 -0
- {tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api.egg-info/top_level.txt +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
from enum import Enum
|
4
4
|
import logging
|
5
5
|
|
6
|
-
VERSION = "0.
|
6
|
+
VERSION = "1.0.0"
|
7
7
|
LOGGER = logging.getLogger(__package__)
|
8
8
|
SERVERS = {
|
9
9
|
"na": "https://fleet-api.prd.na.vn.cloud.tesla.com",
|
@@ -88,11 +88,14 @@ class VehicleDataEndpoint(StrEnum):
|
|
88
88
|
DRIVE_STATE = "drive_state"
|
89
89
|
GUI_SETTINGS = "gui_settings"
|
90
90
|
LOCATION_DATA = "location_data"
|
91
|
+
CHARGE_SCHEDULE_DATA = "charge_schedule_data"
|
92
|
+
PRECONDITIONING_SCHEDULE_DATA = "preconditioning_schedule_data"
|
91
93
|
VEHICLE_CONFIG = "vehicle_config"
|
92
94
|
VEHICLE_STATE = "vehicle_state"
|
93
95
|
VEHICLE_DATA_COMBO = "vehicle_data_combo"
|
94
96
|
|
95
97
|
|
98
|
+
|
96
99
|
class SunRoofCommand(StrEnum):
|
97
100
|
"""Sunroof options"""
|
98
101
|
|
@@ -1,15 +1,10 @@
|
|
1
|
+
from typing import Any
|
2
|
+
|
1
3
|
import aiohttp
|
2
4
|
from aiolimiter import AsyncLimiter
|
3
|
-
from typing import Any
|
4
|
-
from .teslafleetapi import TeslaFleetApi
|
5
|
-
from .charging import Charging
|
6
|
-
from .energy import Energy
|
7
|
-
from .partner import Partner
|
8
|
-
from .user import User
|
9
|
-
from .vehicle import Vehicle
|
10
|
-
from .vehiclespecific import VehicleSpecific
|
11
5
|
|
12
|
-
from .const import
|
6
|
+
from .const import LOGGER, Method, VehicleDataEndpoint
|
7
|
+
from .teslafleetapi import TeslaFleetApi
|
13
8
|
|
14
9
|
# Rate limit should be global, even if multiple instances are created
|
15
10
|
rate_limit = AsyncLimiter(5, 10)
|
@@ -101,6 +96,22 @@ class Teslemetry(TeslaFleetApi):
|
|
101
96
|
)
|
102
97
|
).get("response")
|
103
98
|
|
99
|
+
async def vehicle_force_refresh(self, vin: str) -> dict[str, Any]:
|
100
|
+
"""Force a refresh of the vehicle data."""
|
101
|
+
return await self._request(
|
102
|
+
Method.GET,
|
103
|
+
f"api/force/{vin}",
|
104
|
+
)
|
105
|
+
|
106
|
+
async def vehicle_data_cached(self, vin: str, endpoints: list[VehicleDataEndpoint | str] | None = None,) -> dict[str, Any]:
|
107
|
+
"""Get cached vehicle data."""
|
108
|
+
endpoint_payload = ";".join(endpoints) if endpoints else None
|
109
|
+
return await self._request(
|
110
|
+
Method.GET,
|
111
|
+
f"api/x/vehicles/{vin}/vehicle_data",
|
112
|
+
{"endpoints": endpoint_payload}
|
113
|
+
)
|
114
|
+
|
104
115
|
async def _request(
|
105
116
|
self,
|
106
117
|
method: Method,
|
@@ -737,7 +737,7 @@ class Vehicle:
|
|
737
737
|
async def vehicle_data(
|
738
738
|
self,
|
739
739
|
vehicle_tag: str | int,
|
740
|
-
endpoints:
|
740
|
+
endpoints: list[VehicleDataEndpoint | str] | None = None,
|
741
741
|
) -> dict[str, Any]:
|
742
742
|
"""Makes a live call to the vehicle. This may return cached data if the vehicle is offline. For vehicles running firmware versions 2023.38+, location_data is required to fetch vehicle location. This will result in a location sharing icon to show on the vehicle UI."""
|
743
743
|
endpoint_payload = ";".join(endpoints) if endpoints else None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api/pb2/universal_message_pb2.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tesla_fleet_api-0.8.5 → tesla_fleet_api-0.9.0}/tesla_fleet_api.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|