Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • We just completed a significant update, but we still have some fixes and adjustments to make, so please bear with us for the time being. Cheers!

Tesla Motors Club

So I’ve setup a workflow in the Shortcuts app in iOS that will allow me to set the charge limit to a user defined number. I haven’t previously worked with JSON, accessed an API, etc. So while the shortcut works perfectly, I would like some feedback to make sure I set things up correctly. My ultimate goal is to have location based charge limits (for example to set charge limit to 50% at home, and set it to 80% at work, etc), by incorporating this shortcut into another that will be triggered by my arrival at work, home, etc. I also dislike the slider controls for setting the charge limit both in car and on the Tesla app, as it’s pretty hard to actually set the limit to a round number, which this shortcut allows me to do.

I obtained most of my information from the following TMC posts:

Tesla Owner API Tutorial (All you need is your browser)
Automating your Tesla from your phone using Automate

and also sites that describe the various aspects of the Tesla API, such as

Tesla API and Introduction

Because this is all new to me, the item I'm most unsure about is if I handled the desired percent in a correct manner. The first action is an "ask for input" which queries the user for the desired percent charge limit, which is then handed off to the dictionary and then incorporated into the request body of the "get contents of URL" action.


About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top