tesla-fleet-api 0.5.4__tar.gz → 0.5.6__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.
Files changed (24) hide show
  1. {tesla_fleet_api-0.5.4/tesla_fleet_api.egg-info → tesla_fleet_api-0.5.6}/PKG-INFO +1 -1
  2. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/setup.py +1 -1
  3. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/const.py +1 -1
  4. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/vehicle.py +18 -2
  5. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/vehiclespecific.py +20 -2
  6. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6/tesla_fleet_api.egg-info}/PKG-INFO +1 -1
  7. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/LICENSE +0 -0
  8. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/README.md +0 -0
  9. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/setup.cfg +0 -0
  10. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/__init__.py +0 -0
  11. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/charging.py +0 -0
  12. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/energy.py +0 -0
  13. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/energyspecific.py +0 -0
  14. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/exceptions.py +0 -0
  15. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/partner.py +0 -0
  16. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/teslafleetapi.py +0 -0
  17. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/teslafleetoauth.py +0 -0
  18. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/teslemetry.py +0 -0
  19. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/tessie.py +0 -0
  20. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api/user.py +0 -0
  21. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api.egg-info/SOURCES.txt +0 -0
  22. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api.egg-info/dependency_links.txt +0 -0
  23. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api.egg-info/requires.txt +0 -0
  24. {tesla_fleet_api-0.5.4 → tesla_fleet_api-0.5.6}/tesla_fleet_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tesla_fleet_api
3
- Version: 0.5.4
3
+ Version: 0.5.6
4
4
  Summary: Tesla Fleet API library for Python
5
5
  Home-page: https://github.com/Teslemetry/tesla_fleet_api
6
6
  Author: Brett Adams
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="tesla_fleet_api",
8
- version="0.5.4",
8
+ version="0.5.6",
9
9
  author="Brett Adams",
10
10
  author_email="admin@teslemetry.com",
11
11
  description="Tesla Fleet API library for Python",
@@ -3,7 +3,7 @@
3
3
  from enum import Enum
4
4
  import logging
5
5
 
6
- VERSION = "0.5.4"
6
+ VERSION = "0.5.6"
7
7
  LOGGER = logging.getLogger(__package__)
8
8
  SERVERS = {
9
9
  "na": "https://fleet-api.prd.na.vn.cloud.tesla.com",
@@ -426,13 +426,29 @@ class Vehicle:
426
426
  )
427
427
 
428
428
  async def set_scheduled_departure(
429
- self, vehicle_tag: str | int, enable: bool, time: int
429
+ self,
430
+ vehicle_tag: str | int,
431
+ enable: bool = True,
432
+ preconditioning_enabled: bool = False,
433
+ preconditioning_weekdays_only: bool = False,
434
+ departure_time: int = 0,
435
+ off_peak_charging_enabled: bool = False,
436
+ off_peak_charging_weekdays_only: bool = False,
437
+ end_off_peak_time: int = 0,
430
438
  ) -> dict[str, Any]:
431
439
  """Sets a time at which departure should be completed. The time parameter is minutes after midnight (e.g: time=120 schedules departure for 2:00am vehicle local time)."""
432
440
  return await self._request(
433
441
  Method.POST,
434
442
  f"api/1/vehicles/{vehicle_tag}/command/set_scheduled_departure",
435
- json={"enable": enable, "departure_time": time},
443
+ json={
444
+ "enable": enable,
445
+ "preconditioning_enabled": preconditioning_enabled,
446
+ "preconditioning_weekdays_only": preconditioning_weekdays_only,
447
+ "departure_time": departure_time,
448
+ "off_peak_charging_enabled": off_peak_charging_enabled,
449
+ "off_peak_charging_weekdays_only": off_peak_charging_weekdays_only,
450
+ "end_off_peak_time": end_off_peak_time,
451
+ },
436
452
  )
437
453
 
438
454
  async def set_sentry_mode(self, vehicle_tag: str | int, on: bool) -> dict[str, Any]:
@@ -243,9 +243,27 @@ class VehicleSpecific:
243
243
  """Sets a time at which charging should be completed. The time parameter is minutes after midnight (e.g: time=120 schedules charging for 2:00am vehicle local time)."""
244
244
  return await self._parent.set_scheduled_charging(self.vin, enable, time)
245
245
 
246
- async def set_scheduled_departure(self, enable: bool, time: int) -> dict[str, Any]:
246
+ async def set_scheduled_departure(
247
+ self,
248
+ enable: bool = True,
249
+ preconditioning_enabled: bool = False,
250
+ preconditioning_weekdays_only: bool = False,
251
+ departure_time: int = 0,
252
+ off_peak_charging_enabled: bool = False,
253
+ off_peak_charging_weekdays_only: bool = False,
254
+ end_off_peak_time: int = 0,
255
+ ) -> dict[str, Any]:
247
256
  """Sets a time at which departure should be completed. The time parameter is minutes after midnight (e.g: time=120 schedules departure for 2:00am vehicle local time)."""
248
- return await self._parent.set_scheduled_departure(self.vin, enable, time)
257
+ return await self._parent.set_scheduled_departure(
258
+ self.vin,
259
+ enable,
260
+ preconditioning_enabled,
261
+ preconditioning_weekdays_only,
262
+ departure_time,
263
+ off_peak_charging_enabled,
264
+ off_peak_charging_weekdays_only,
265
+ end_off_peak_time,
266
+ )
249
267
 
250
268
  async def set_sentry_mode(self, on: bool) -> dict[str, Any]:
251
269
  """Enables and disables Sentry Mode. Sentry Mode allows customers to watch the vehicle cameras live from the mobile app, as well as record sentry events."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tesla_fleet_api
3
- Version: 0.5.4
3
+ Version: 0.5.6
4
4
  Summary: Tesla Fleet API library for Python
5
5
  Home-page: https://github.com/Teslemetry/tesla_fleet_api
6
6
  Author: Brett Adams
File without changes