tesla-fleet-api 1.0.17__py3-none-any.whl → 1.1.0__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.
- tesla_fleet_api/__init__.py +1 -1
- tesla_fleet_api/exceptions.py +26 -6
- tesla_fleet_api/tesla/vehicle/commands.py +6 -4
- tesla_fleet_api/tesla/vehicle/fleet.py +5 -2
- tesla_fleet_api/tesla/vehicle/proto/car_server_pb2.py +310 -160
- tesla_fleet_api/tesla/vehicle/proto/car_server_pb2.pyi +823 -7
- tesla_fleet_api/tesla/vehicle/proto/common_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/common_pb2.pyi +2 -1
- tesla_fleet_api/tesla/vehicle/proto/errors_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/keys_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/managed_charging_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/signatures_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/signatures_pb2.pyi +2 -1
- tesla_fleet_api/tesla/vehicle/proto/universal_message_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/universal_message_pb2.pyi +2 -1
- tesla_fleet_api/tesla/vehicle/proto/vcsec_pb2.py +27 -25
- tesla_fleet_api/tesla/vehicle/proto/vcsec_pb2.pyi +53 -2
- tesla_fleet_api/tesla/vehicle/proto/vehicle_pb2.py +4 -2
- tesla_fleet_api/tesla/vehicle/proto/vehicle_pb2.pyi +14 -13
- tesla_fleet_api/teslemetry/teslemetry.py +1 -1
- {tesla_fleet_api-1.0.17.dist-info → tesla_fleet_api-1.1.0.dist-info}/METADATA +1 -2
- {tesla_fleet_api-1.0.17.dist-info → tesla_fleet_api-1.1.0.dist-info}/RECORD +25 -25
- {tesla_fleet_api-1.0.17.dist-info → tesla_fleet_api-1.1.0.dist-info}/WHEEL +1 -1
- {tesla_fleet_api-1.0.17.dist-info → tesla_fleet_api-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {tesla_fleet_api-1.0.17.dist-info → tesla_fleet_api-1.1.0.dist-info}/top_level.txt +0 -0
tesla_fleet_api/__init__.py
CHANGED
tesla_fleet_api/exceptions.py
CHANGED
@@ -963,13 +963,30 @@ class WhitelistOperationServiceKeyAttemptingToAddServiceTechOutsideServiceMode(W
|
|
963
963
|
message = "Service key attempting to add service tech outside service mode"
|
964
964
|
code = 22
|
965
965
|
|
966
|
-
|
966
|
+
class WhitelistOperationCouldNotStartLocalEntityAuth(WhitelistOperationStatus):
|
967
|
+
message = "Could not start local entity authentication"
|
968
|
+
code = 23
|
969
|
+
|
970
|
+
class WhitelistOperationLocalEntityAuthFailedUIDenied(WhitelistOperationStatus):
|
971
|
+
message = "Local entity authentication failed - UI denied"
|
972
|
+
code = 24
|
967
973
|
|
968
|
-
class
|
969
|
-
# This is observed but not documented
|
974
|
+
class WhitelistOperationLocalEntityAuthFailedTimedOutWaitingForTap(WhitelistOperationStatus):
|
970
975
|
message = "Authorization request timed out"
|
971
976
|
code = 25
|
972
977
|
|
978
|
+
class WhitelistOperationLocalEntityAuthFailedTimedOutWaitingForUIAck(WhitelistOperationStatus):
|
979
|
+
message = "Local entity authentication failed - timed out waiting for UI acknowledgement"
|
980
|
+
code = 26
|
981
|
+
|
982
|
+
class WhitelistOperationLocalEntityAuthFailedValetMode(WhitelistOperationStatus):
|
983
|
+
message = "Local entity authentication failed - valet mode"
|
984
|
+
code = 27
|
985
|
+
|
986
|
+
class WhitelistOperationLocalEntityAuthFailedCancelled(WhitelistOperationStatus):
|
987
|
+
message = "Local entity authentication failed - cancelled"
|
988
|
+
code = 28
|
989
|
+
|
973
990
|
|
974
991
|
WHITELIST_OPERATION_STATUS = [
|
975
992
|
None,
|
@@ -995,9 +1012,12 @@ WHITELIST_OPERATION_STATUS = [
|
|
995
1012
|
WhitelistOperationAttemptingToAddKeyWithServiceRole,
|
996
1013
|
WhitelistOperationNonServiceKeyAttemptingToAddServiceTech,
|
997
1014
|
WhitelistOperationServiceKeyAttemptingToAddServiceTechOutsideServiceMode,
|
998
|
-
|
999
|
-
|
1000
|
-
|
1015
|
+
WhitelistOperationCouldNotStartLocalEntityAuth,
|
1016
|
+
WhitelistOperationLocalEntityAuthFailedUIDenied,
|
1017
|
+
WhitelistOperationLocalEntityAuthFailedTimedOutWaitingForTap,
|
1018
|
+
WhitelistOperationLocalEntityAuthFailedTimedOutWaitingForUIAck,
|
1019
|
+
WhitelistOperationLocalEntityAuthFailedValetMode,
|
1020
|
+
WhitelistOperationLocalEntityAuthFailedCancelled
|
1001
1021
|
]
|
1002
1022
|
|
1003
1023
|
|
@@ -1174,14 +1174,16 @@ class Commands(Vehicle):
|
|
1174
1174
|
)
|
1175
1175
|
)
|
1176
1176
|
|
1177
|
-
async def set_valet_mode(self, on: bool, password: str | int) -> dict[str, Any]:
|
1177
|
+
async def set_valet_mode(self, on: bool, password: str | int | None = None) -> dict[str, Any]:
|
1178
1178
|
"""Turns on Valet Mode and sets a four-digit passcode that must then be entered to disable Valet Mode."""
|
1179
|
+
action = VehicleControlSetValetModeAction(on=on)
|
1180
|
+
if password is not None:
|
1181
|
+
action.password = str(password)
|
1182
|
+
|
1179
1183
|
return await self._sendInfotainment(
|
1180
1184
|
Action(
|
1181
1185
|
vehicleAction=VehicleAction(
|
1182
|
-
vehicleControlSetValetModeAction=
|
1183
|
-
on=on, password=str(password)
|
1184
|
-
)
|
1186
|
+
vehicleControlSetValetModeAction=action
|
1185
1187
|
)
|
1186
1188
|
)
|
1187
1189
|
)
|
@@ -475,13 +475,16 @@ class VehicleFleet(Vehicle):
|
|
475
475
|
)
|
476
476
|
|
477
477
|
async def set_valet_mode(
|
478
|
-
self, on: bool, password: str | int
|
478
|
+
self, on: bool, password: str | int | None = None
|
479
479
|
) -> dict[str, Any]:
|
480
480
|
"""Turns on Valet Mode and sets a four-digit passcode that must then be entered to disable Valet Mode."""
|
481
|
+
json_data: dict[str,Any] = {"on": on}
|
482
|
+
if password is not None:
|
483
|
+
json_data["password"] = str(password)
|
481
484
|
return await self._request(
|
482
485
|
Method.POST,
|
483
486
|
f"api/1/vehicles/{self.vin}/command/set_valet_mode",
|
484
|
-
json=
|
487
|
+
json=json_data,
|
485
488
|
)
|
486
489
|
|
487
490
|
async def set_vehicle_name(
|