tesla-fleet-api 0.9.8__tar.gz → 0.9.9__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {tesla_fleet_api-0.9.8/tesla_fleet_api.egg-info → tesla_fleet_api-0.9.9}/PKG-INFO +1 -1
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/setup.py +1 -1
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/const.py +1 -1
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/vehicle.py +85 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/vehiclespecific.py +54 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9/tesla_fleet_api.egg-info}/PKG-INFO +1 -1
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/LICENSE +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/README.md +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/setup.cfg +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/__init__.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/charging.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/energy.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/energyspecific.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/exceptions.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/partner.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/__init__.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/__init__.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/car_server_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/car_server_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/common_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/common_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/errors_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/errors_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/keys_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/keys_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/managed_charging_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/managed_charging_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/signatures_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/signatures_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/universal_message_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/universal_message_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/vcsec_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/vcsec_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/vehicle_pb2.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/vehicle_pb2.pyi +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/ratecalculator.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/teslafleetapi.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/teslafleetoauth.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/teslafleetopensource.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/teslemetry.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/tessie.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/user.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/vehiclesigned.py +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api.egg-info/SOURCES.txt +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api.egg-info/dependency_links.txt +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api.egg-info/requires.txt +0 -0
- {tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api.egg-info/top_level.txt +0 -0
@@ -791,3 +791,88 @@ class Vehicle:
|
|
791
791
|
return await self._request(
|
792
792
|
Method.DELETE, f"api/1/vehicles/{vehicle_tag}/fleet_telemetry_config"
|
793
793
|
)
|
794
|
+
|
795
|
+
async def add_charge_schedule(
|
796
|
+
self,
|
797
|
+
vehicle_tag: str | int,
|
798
|
+
days_of_week: str,
|
799
|
+
enabled: bool,
|
800
|
+
lat: float,
|
801
|
+
lon: float,
|
802
|
+
start_time: int | None = None,
|
803
|
+
end_time: int | None = None,
|
804
|
+
one_time: bool | None = None,
|
805
|
+
id: int | None = None,
|
806
|
+
|
807
|
+
) -> dict[str, Any]:
|
808
|
+
"""Add a schedule for vehicle charging."""
|
809
|
+
if not start_time and not end_time:
|
810
|
+
raise ValueError("Either start_time or end_time or both must be provided")
|
811
|
+
json_payload = {
|
812
|
+
"days_of_week": days_of_week,
|
813
|
+
"enabled": enabled,
|
814
|
+
"end_enabled": end_time is not None,
|
815
|
+
"lat": lat,
|
816
|
+
"lon": lon,
|
817
|
+
"start_enabled": start_time is not None,
|
818
|
+
}
|
819
|
+
if start_time is not None:
|
820
|
+
json_payload["start_time"] = start_time
|
821
|
+
if end_time is not None:
|
822
|
+
json_payload["end_time"] = end_time
|
823
|
+
if id is not None:
|
824
|
+
json_payload["id"] = id
|
825
|
+
if one_time is not None:
|
826
|
+
json_payload["one_time"] = one_time
|
827
|
+
|
828
|
+
return await self._request(
|
829
|
+
Method.POST,
|
830
|
+
f"api/1/vehicles/{vehicle_tag}/command/add_charge_schedule",
|
831
|
+
json=json_payload,
|
832
|
+
)
|
833
|
+
|
834
|
+
async def add_precondition_schedule(
|
835
|
+
self,
|
836
|
+
vehicle_tag: str | int,
|
837
|
+
days_of_week: str,
|
838
|
+
enabled: bool,
|
839
|
+
lat: float,
|
840
|
+
lon: float,
|
841
|
+
precondition_time: int,
|
842
|
+
id: int | None = None,
|
843
|
+
one_time: bool | None = None,
|
844
|
+
) -> dict[str, Any]:
|
845
|
+
"""Add or modify a preconditioning schedule."""
|
846
|
+
json_payload = {
|
847
|
+
"days_of_week": days_of_week,
|
848
|
+
"enabled": enabled,
|
849
|
+
"lat": lat,
|
850
|
+
"lon": lon,
|
851
|
+
"precondition_time": precondition_time,
|
852
|
+
}
|
853
|
+
if id is not None:
|
854
|
+
json_payload["id"] = id
|
855
|
+
if one_time is not None:
|
856
|
+
json_payload["one_time"] = one_time
|
857
|
+
|
858
|
+
return await self._request(
|
859
|
+
Method.POST,
|
860
|
+
f"api/1/vehicles/{vehicle_tag}/command/add_precondition_schedule",
|
861
|
+
json=json_payload,
|
862
|
+
)
|
863
|
+
|
864
|
+
async def remove_charge_schedule(
|
865
|
+
self, vehicle_tag: str | int, id: int
|
866
|
+
) -> dict[str, Any]:
|
867
|
+
"""Removes the scheduled charging settings."""
|
868
|
+
return await self._request(
|
869
|
+
Method.POST, f"api/1/vehicles/{vehicle_tag}/command/remove_charge_schedule", json={"id": id}
|
870
|
+
)
|
871
|
+
|
872
|
+
async def remove_precondition_schedule(
|
873
|
+
self, vehicle_tag: str | int, id: int
|
874
|
+
) -> dict[str, Any]:
|
875
|
+
"""Removes the scheduled precondition settings."""
|
876
|
+
return await self._request(
|
877
|
+
Method.POST, f"api/1/vehicles/{vehicle_tag}/command/remove_precondition_schedule", json={"id": id}
|
878
|
+
)
|
@@ -449,3 +449,57 @@ class VehicleSpecific:
|
|
449
449
|
async def fleet_telemetry_config_delete(self) -> dict[str, Any]:
|
450
450
|
"""Configures fleet telemetry."""
|
451
451
|
return await self._parent.fleet_telemetry_config_delete(self.vin)
|
452
|
+
|
453
|
+
async def add_charge_schedule(
|
454
|
+
self,
|
455
|
+
days_of_week: str,
|
456
|
+
enabled: bool,
|
457
|
+
lat: float,
|
458
|
+
lon: float,
|
459
|
+
start_time: int | None = None,
|
460
|
+
end_time: int | None = None,
|
461
|
+
one_time: bool | None = None,
|
462
|
+
id: int | None = None,
|
463
|
+
) -> dict[str, Any]:
|
464
|
+
"""Adds a scheduled charging setting."""
|
465
|
+
return await self._parent.add_charge_schedule(
|
466
|
+
self.vin,
|
467
|
+
days_of_week,
|
468
|
+
enabled,
|
469
|
+
lat,
|
470
|
+
lon,
|
471
|
+
start_time,
|
472
|
+
end_time,
|
473
|
+
one_time,
|
474
|
+
id,
|
475
|
+
)
|
476
|
+
|
477
|
+
async def add_precondition_schedule(
|
478
|
+
self,
|
479
|
+
days_of_week: str,
|
480
|
+
enabled: bool,
|
481
|
+
lat: float,
|
482
|
+
lon: float,
|
483
|
+
precondition_time: int,
|
484
|
+
id: int | None = None,
|
485
|
+
one_time: bool | None = None,
|
486
|
+
) -> dict[str, Any]:
|
487
|
+
"""Adds a scheduled precondition setting."""
|
488
|
+
return await self._parent.add_precondition_schedule(
|
489
|
+
self.vin,
|
490
|
+
days_of_week,
|
491
|
+
enabled,
|
492
|
+
lat,
|
493
|
+
lon,
|
494
|
+
precondition_time,
|
495
|
+
id,
|
496
|
+
one_time,
|
497
|
+
)
|
498
|
+
|
499
|
+
async def remove_charge_schedule(self, id: int) -> dict[str, Any]:
|
500
|
+
"""Removes the scheduled charging settings."""
|
501
|
+
return await self._parent.remove_charge_schedule(self.vin, id)
|
502
|
+
|
503
|
+
async def remove_precondition_schedule(self, id: int) -> dict[str, Any]:
|
504
|
+
"""Removes the scheduled precondition settings."""
|
505
|
+
return await self._parent.remove_precondition_schedule(self.vin, id)
|
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
|
File without changes
|
{tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/managed_charging_pb2.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
{tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api/pb2/universal_message_pb2.py
RENAMED
File without changes
|
{tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/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
|
File without changes
|
{tesla_fleet_api-0.9.8 → tesla_fleet_api-0.9.9}/tesla_fleet_api.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|