Created
February 11, 2022 14:05
-
-
Save planecore/45c61caefc29cedc8c7a6a57f46104f3 to your computer and use it in GitHub Desktop.
Enable Sentry Mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from decouple import config | |
import teslapy | |
with teslapy.Tesla(config('EMAIL')) as tesla: | |
if not tesla.authorized: | |
tesla.refresh_token(refresh_token=config('TOKEN')) | |
tessie = tesla.vehicle_list()[0] | |
tessie.sync_wake_up() | |
tessie.command('SET_SENTRY_MODE', on='true') | |
tesla.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
certifi==2021.10.8 | |
charset-normalizer==2.0.11 | |
idna==3.3 | |
oauthlib==3.2.0 | |
python-decouple==3.6 | |
requests==2.27.1 | |
requests-oauthlib==1.3.1 | |
TeslaPy==2.4.0 | |
urllib3==1.26.8 | |
websocket-client==1.2.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enter your Tesla account email and refresh token in an
.env
file with the following format:You can generate a refresh token with apps like Auth App for Tesla (iOS) and Tesla Tokens (Android).