Skip to content

Commit

Permalink
more commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Oct 8, 2024
1 parent 7cfe321 commit 8753fe1
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions tesla_fleet_api/vehiclesigned.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .pb2.car_server_pb2 import (
Action,
HvacAutoAction,
MediaPlayAction,
VehicleAction,
VehicleControlFlashLightsAction,
ChargingStartStopAction,
Expand Down Expand Up @@ -519,34 +520,35 @@ async def media_toggle_playback(self) -> dict[str, Any]:
return await self._sendInfotainment(
Action(
vehicleAction=VehicleAction(
mediaPlayAction=MediaPlayAction() # This is missing
mediaPlayAction=MediaPlayAction()
)
)
)

async def media_volume_down(self) -> dict[str, Any]:
"""Turns the volume down by one."""
return await self._parent.media_volume_down(self.vin)

async def navigation_gps_request(
self, lat: float, lon: float, order: int | None = None
) -> dict[str, Any]:
"""Start navigation to given coordinates. Order can be used to specify order of multiple stops."""
return await self._parent.navigation_gps_request(self.vin, lat, lon, order)
return await self._sendInfotainment(
Action(
vehicleAction=VehicleAction(
mediaUpdateVolume=MediaUpdateVolume(volume_delta=-1)
)
)
)

async def navigation_request(
self, type: str, locale: str, timestamp_ms: str
) -> dict[str, Any]:
"""Sends a location to the in-vehicle navigation system."""
return await self._parent.navigation_request(
self.vin, type, locale, timestamp_ms
# This one is new
async def media_volume_up(self) -> dict[str, Any]:
"""Turns the volume up by one."""
return await self._sendInfotainment(
Action(
vehicleAction=VehicleAction(
mediaUpdateVolume=MediaUpdateVolume(volume_delta=1)
)
)
)

async def navigation_sc_request(
self, id: int, order: int | None = None
) -> dict[str, Any]:
"""Sends a location to the in-vehicle navigation system."""
return await self._parent.navigation_sc_request(self.vin, id, order)
#navigation_gps_request doesnt require signing
#navigation_request doesnt require signing
#navigation_sc_request doesnt require signing

async def remote_auto_seat_climate_request(
self, auto_seat_position: int, auto_climate_on: bool
Expand Down

0 comments on commit 8753fe1

Please sign in to comment.