tesla-fleet-api 0.9.9__tar.gz → 0.9.10__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {tesla_fleet_api-0.9.9/tesla_fleet_api.egg-info → tesla_fleet_api-0.9.10}/PKG-INFO +1 -1
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/setup.py +1 -1
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/const.py +1 -1
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/vehicle.py +4 -2
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/vehiclesigned.py +13 -11
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/vehiclespecific.py +6 -2
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10/tesla_fleet_api.egg-info}/PKG-INFO +1 -1
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/LICENSE +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/README.md +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/setup.cfg +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/__init__.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/charging.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/energy.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/energyspecific.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/exceptions.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/partner.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/__init__.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/__init__.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/car_server_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/car_server_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/common_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/common_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/errors_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/errors_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/keys_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/keys_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/managed_charging_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/managed_charging_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/signatures_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/signatures_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/universal_message_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/universal_message_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/vcsec_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/vcsec_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/vehicle_pb2.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/vehicle_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/ratecalculator.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/teslafleetapi.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/teslafleetoauth.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/teslafleetopensource.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/teslemetry.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/tessie.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/user.py +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api.egg-info/SOURCES.txt +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api.egg-info/dependency_links.txt +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api.egg-info/requires.txt +0 -0
- {tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api.egg-info/top_level.txt +0 -0
@@ -795,7 +795,7 @@ class Vehicle:
|
|
795
795
|
async def add_charge_schedule(
|
796
796
|
self,
|
797
797
|
vehicle_tag: str | int,
|
798
|
-
days_of_week: str,
|
798
|
+
days_of_week: str | int,
|
799
799
|
enabled: bool,
|
800
800
|
lat: float,
|
801
801
|
lon: float,
|
@@ -803,6 +803,7 @@ class Vehicle:
|
|
803
803
|
end_time: int | None = None,
|
804
804
|
one_time: bool | None = None,
|
805
805
|
id: int | None = None,
|
806
|
+
name: str | None = None,
|
806
807
|
|
807
808
|
) -> dict[str, Any]:
|
808
809
|
"""Add a schedule for vehicle charging."""
|
@@ -834,13 +835,14 @@ class Vehicle:
|
|
834
835
|
async def add_precondition_schedule(
|
835
836
|
self,
|
836
837
|
vehicle_tag: str | int,
|
837
|
-
days_of_week: str,
|
838
|
+
days_of_week: str | int,
|
838
839
|
enabled: bool,
|
839
840
|
lat: float,
|
840
841
|
lon: float,
|
841
842
|
precondition_time: int,
|
842
843
|
id: int | None = None,
|
843
844
|
one_time: bool | None = None,
|
845
|
+
name: str | None = None,
|
844
846
|
) -> dict[str, Any]:
|
845
847
|
"""Add or modify a preconditioning schedule."""
|
846
848
|
json_payload = {
|
@@ -127,24 +127,26 @@ class Session:
|
|
127
127
|
|
128
128
|
def __init__(self):
|
129
129
|
self.lock = Lock()
|
130
|
+
self.counter = 0
|
130
131
|
|
131
132
|
def update(self, sessionInfo: SessionInfo, privateKey: ec.EllipticCurvePrivateKey):
|
132
133
|
"""Update the session with new information"""
|
133
134
|
self.counter = sessionInfo.counter
|
134
135
|
self.epoch = sessionInfo.epoch
|
135
136
|
self.delta = int(time.time()) - sessionInfo.clock_time
|
136
|
-
self.publicKey
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
ec.
|
137
|
+
if (self.publicKey != sessionInfo.publicKey):
|
138
|
+
self.publicKey = sessionInfo.publicKey
|
139
|
+
self.key = hashlib.sha1(
|
140
|
+
privateKey.exchange(
|
141
|
+
ec.ECDH(),
|
142
|
+
ec.EllipticCurvePublicKey.from_encoded_point(
|
143
|
+
ec.SECP256R1(), self.publicKey
|
144
|
+
),
|
142
145
|
),
|
143
|
-
)
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
).digest()
|
146
|
+
).digest()[:16]
|
147
|
+
self.hmac = hmac.new(
|
148
|
+
self.key, "authenticated command".encode(), hashlib.sha256
|
149
|
+
).digest()
|
148
150
|
|
149
151
|
def get(self) -> HMAC_Personalized_Signature_Data:
|
150
152
|
"""Sign a command and return session metadata"""
|
@@ -452,7 +452,7 @@ class VehicleSpecific:
|
|
452
452
|
|
453
453
|
async def add_charge_schedule(
|
454
454
|
self,
|
455
|
-
days_of_week: str,
|
455
|
+
days_of_week: str | int,
|
456
456
|
enabled: bool,
|
457
457
|
lat: float,
|
458
458
|
lon: float,
|
@@ -460,6 +460,7 @@ class VehicleSpecific:
|
|
460
460
|
end_time: int | None = None,
|
461
461
|
one_time: bool | None = None,
|
462
462
|
id: int | None = None,
|
463
|
+
name: str | None = None,
|
463
464
|
) -> dict[str, Any]:
|
464
465
|
"""Adds a scheduled charging setting."""
|
465
466
|
return await self._parent.add_charge_schedule(
|
@@ -472,17 +473,19 @@ class VehicleSpecific:
|
|
472
473
|
end_time,
|
473
474
|
one_time,
|
474
475
|
id,
|
476
|
+
name,
|
475
477
|
)
|
476
478
|
|
477
479
|
async def add_precondition_schedule(
|
478
480
|
self,
|
479
|
-
days_of_week: str,
|
481
|
+
days_of_week: str | int,
|
480
482
|
enabled: bool,
|
481
483
|
lat: float,
|
482
484
|
lon: float,
|
483
485
|
precondition_time: int,
|
484
486
|
id: int | None = None,
|
485
487
|
one_time: bool | None = None,
|
488
|
+
name: str | None = None,
|
486
489
|
) -> dict[str, Any]:
|
487
490
|
"""Adds a scheduled precondition setting."""
|
488
491
|
return await self._parent.add_precondition_schedule(
|
@@ -494,6 +497,7 @@ class VehicleSpecific:
|
|
494
497
|
precondition_time,
|
495
498
|
id,
|
496
499
|
one_time,
|
500
|
+
name,
|
497
501
|
)
|
498
502
|
|
499
503
|
async def remove_charge_schedule(self, id: int) -> dict[str, Any]:
|
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
|
File without changes
|
File without changes
|
File without changes
|
{tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/managed_charging_pb2.py
RENAMED
File without changes
|
{tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/managed_charging_pb2.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
{tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/universal_message_pb2.py
RENAMED
File without changes
|
{tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api/pb2/universal_message_pb2.pyi
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
|
File without changes
|
{tesla_fleet_api-0.9.9 → tesla_fleet_api-0.9.10}/tesla_fleet_api.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|