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.
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.