Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/rivian/parallax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
encode_command(vehicle_id, rvm, payload, ...) -> str
Builds and signs a `send_parallax_command` request, with a payload
such as `encode_unlock()`.
LOCK_RVM / encode_lock(), UNLOCK_RVM / encode_unlock()
The RVM and payload of a signed lock or unlock command.
decode_command_state_message(data) -> dict | None
Reads a raw `subscribe_for_parallax_command_state` message.

Layout:
core.py - registry, payload parsing and shared helpers
command.py - signed remote commands and their state messages
proto/ - .proto schemas and their generated *_pb2 modules
core.py - registry, payload parsing and shared helpers
command.py - signed remote commands and their state messages
proto/ - .proto schemas and their generated *_pb2 modules
<topic prefix>.py - one module per RVM topic prefix (body.*, etc.)

To add a decoder, decorate it with
Expand Down
2 changes: 1 addition & 1 deletion src/rivian/rivian.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ async def depart_now(
return await self.__graphql_query(headers, url, graphql_json)

async def send_location_to_vehicle(
self, location: str, vehicle_id: str
self, vehicle_id: str, location: str
) -> ClientResponse:
"""Send a destination to a vehicle's navigation.

Expand Down
2 changes: 1 addition & 1 deletion tests/test_rivian.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ async def test_send_location_to_vehicle(aresponses: ResponsesMockServer) -> None
)

response = await rivian.send_location_to_vehicle(
"123 Main St, Springfield, IL", "vehicle_id"
"vehicle_id", "123 Main St, Springfield, IL"
)
response_json = await response.json()
result = response_json["data"]["parseAndShareLocationToVehicle"]
Expand Down
Loading