Skip to content

Commit

Permalink
tesla-control: Add guest mode support
Browse files Browse the repository at this point in the history
Adds guest mode commands to the tesla-control CLI. The commands were
already supported in the SDK and proxy.
  • Loading branch information
Seth Terashima authored and sethterashima committed Oct 16, 2024
1 parent 9a9fc14 commit 3ee2bec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/tesla-control/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,22 @@ var commands = map[string]*Command{
return nil
},
},
"guest-mode-on": &Command{
help: "Enable Guest Mode. See https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands#guest-mode.",
requiresAuth: true,
requiresFleetAPI: false,
handler: func(ctx context.Context, acct *account.Account, car *vehicle.Vehicle, args map[string]string) error {
return car.SetGuestMode(ctx, true)
},
},
"guest-mode-off": &Command{
help: "Disable Guest Mode.",
requiresAuth: true,
requiresFleetAPI: false,
handler: func(ctx context.Context, acct *account.Account, car *vehicle.Vehicle, args map[string]string) error {
return car.SetGuestMode(ctx, false)
},
},
"erase-guest-data": &Command{
help: "Erase Guest Mode user data",
requiresAuth: true,
Expand Down

0 comments on commit 3ee2bec

Please sign in to comment.