From 3ee2beca0aa0a006ff6eaebfff1fd7dc0434fe69 Mon Sep 17 00:00:00 2001 From: Seth Terashima Date: Mon, 14 Oct 2024 15:07:14 -0700 Subject: [PATCH] tesla-control: Add guest mode support Adds guest mode commands to the tesla-control CLI. The commands were already supported in the SDK and proxy. --- cmd/tesla-control/commands.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cmd/tesla-control/commands.go b/cmd/tesla-control/commands.go index 345ca38..ea3f2b1 100644 --- a/cmd/tesla-control/commands.go +++ b/cmd/tesla-control/commands.go @@ -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,