Scriptable popped up on my radar not long after the release of iOS 14 due to its rich support for widgets. Scripts have complete control over the widget’s appearance and can present whatever information you’d like. Scriptable even refreshes widgets in the background so they can be kept up-to-date.
I recently purchased a Tesla Model 3 and have been tinkering with the Tesla API in Shortcuts. (Although this is Tesla’s API, it’s not officially available to third-parties. The Tesla community has been reverse-engineering and documenting it for years). This was also a good opportunity to learn more about Scriptable.
Tesla’s API requires an access token for authentication. One of the shortcuts generates this token using your Tesla login credentials, then saves it to iCloud Drive for all shortcuts to reference. Your password is not saved at any point and is only used to create the token with Tesla’s API.
One notable feature of both the shortcuts and scripts is that, where necessary, it automatically converts distance and temperature based on your car’s preferred units of measurement. Tesla’s API uses miles and Celsius, an oddly British combination of metric and imperial, so any conversion is done for kilometers and Fahrenheit automatically.
I plan to spend more time with Scriptable and have set up a GitHub repository for my scripts.