Skip to content

Commit 0a76d5c

Browse files
committed
Update add schedules
1 parent 6447fd0 commit 0a76d5c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tesla_fleet_api/vehicle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,15 @@ async def fleet_telemetry_config_delete(
795795
async def add_charge_schedule(
796796
self,
797797
vehicle_tag: str | int,
798-
days_of_week: str,
798+
days_of_week: str | int,
799799
enabled: bool,
800800
lat: float,
801801
lon: float,
802802
start_time: int | None = None,
803803
end_time: int | None = None,
804804
one_time: bool | None = None,
805805
id: int | None = None,
806+
name: str | None = None,
806807

807808
) -> dict[str, Any]:
808809
"""Add a schedule for vehicle charging."""
@@ -834,13 +835,14 @@ async def add_charge_schedule(
834835
async def add_precondition_schedule(
835836
self,
836837
vehicle_tag: str | int,
837-
days_of_week: str,
838+
days_of_week: str | int,
838839
enabled: bool,
839840
lat: float,
840841
lon: float,
841842
precondition_time: int,
842843
id: int | None = None,
843844
one_time: bool | None = None,
845+
name: str | None = None,
844846
) -> dict[str, Any]:
845847
"""Add or modify a preconditioning schedule."""
846848
json_payload = {

tesla_fleet_api/vehiclespecific.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,15 @@ async def fleet_telemetry_config_delete(self) -> dict[str, Any]:
452452

453453
async def add_charge_schedule(
454454
self,
455-
days_of_week: str,
455+
days_of_week: str | int,
456456
enabled: bool,
457457
lat: float,
458458
lon: float,
459459
start_time: int | None = None,
460460
end_time: int | None = None,
461461
one_time: bool | None = None,
462462
id: int | None = None,
463+
name: str | None = None,
463464
) -> dict[str, Any]:
464465
"""Adds a scheduled charging setting."""
465466
return await self._parent.add_charge_schedule(
@@ -472,17 +473,19 @@ async def add_charge_schedule(
472473
end_time,
473474
one_time,
474475
id,
476+
name,
475477
)
476478

477479
async def add_precondition_schedule(
478480
self,
479-
days_of_week: str,
481+
days_of_week: str | int,
480482
enabled: bool,
481483
lat: float,
482484
lon: float,
483485
precondition_time: int,
484486
id: int | None = None,
485487
one_time: bool | None = None,
488+
name: str | None = None,
486489
) -> dict[str, Any]:
487490
"""Adds a scheduled precondition setting."""
488491
return await self._parent.add_precondition_schedule(
@@ -494,6 +497,7 @@ async def add_precondition_schedule(
494497
precondition_time,
495498
id,
496499
one_time,
500+
name,
497501
)
498502

499503
async def remove_charge_schedule(self, id: int) -> dict[str, Any]:

0 commit comments

Comments
 (0)