Automations
Teslemetry has a built-in automation engine. An automation runs Teslemetry commands for you at a time of day, or when your vehicle's live telemetry changes, without Home Assistant, Node-RED, n8n or any other software running at home.
Common uses:
- Switch a Powerwall between Self-Powered and Time-Based Control on a schedule.
- Change the Powerwall backup reserve at set times.
- Start or stop charging the car at night.
- Turn on climate before you leave for work.
Automations are in alpha. Open them in the Console under Utilities -> Automations, or go straight to /console/utilities/automations. An active subscription is required.
How an automation works
Each automation has three parts:
- Triggers - when to run. The automation runs when any one trigger fires.
- Conditions - optional checks. Every condition must pass, or the run is skipped.
- Actions - what to do. Actions run in order, and the first one that fails stops the run.
Each automation also has a name, a time zone (times are local to it) and an Enabled switch to pause it without deleting it.
Triggers
| Trigger | Fires when |
|---|---|
| At a time | The clock reaches a time (HH:MM) on the days you pick. |
| Telemetry changes | A vehicle telemetry field changes. Optionally only from or to a value, or not from or to a value. |
| Telemetry crosses a number | A numeric vehicle telemetry field rises above or falls below a number. It fires when the value moves into the range, not on every update inside it. |
Telemetry triggers can also hold for a number of seconds: the new value must last that long before the automation runs, and any further change cancels the wait.
Telemetry triggers use your vehicle's live Fleet Telemetry stream, so the field must be in that vehicle's telemetry configuration. Energy site data cannot be used as a trigger yet; use a time trigger for Powerwall schedules.
Conditions
| Condition | Passes when |
|---|---|
| Telemetry value | A vehicle telemetry field is, is not, is above or is below a value. Teslemetry reads the latest value it has and never wakes the vehicle to check. |
| Vehicle is online | The vehicle is online. |
| Time window | The time is within a window (from, until) and, optionally, on the days you pick. A window such as 22:00 until 06:00 crosses midnight. |
| All of / Any of / None of | Groups of conditions combined with and, or, or not. Groups can nest up to 3 deep. |
Actions
- Run a command - any vehicle command or energy site command, on one of your vehicles or energy sites. The list in the editor shows every command automations can use, such as Operating Mode, Backup, Storm Mode, Charge Start, Charge Stop and climate controls.
- Wait - pause before the next action, up to 30 minutes per wait and 60 minutes in total per automation.
Only vehicle and energy site commands can be used as actions. Account settings and other automations cannot.
Create an automation
- Open Utilities -> Automations in the Console.
- Select New automation.
- Give it a Name and check the Time zone.
- Select Add trigger and choose the trigger type.
- Optionally, select Add condition or Add group.
- Select Add command (or Add wait) for each action, then choose the command, the vehicle or energy site, and its settings.
- Select Create. Teslemetry checks the whole automation before it is saved and shows any problem next to the field it concerns.
You can also select Generate automation and describe what you want in plain language. The draft opens in the editor for you to check, and nothing is saved until you select Create.
From the list you can switch an automation on or off, edit or rename it, delete it, or use Run now to run its actions straight away. Run now skips the conditions.
AI assistants connected through the Teslemetry MCP server can also list, create, change and run automations for you.
Run history
Every run, whether a trigger or Run now started it, is kept for 30 days. The Run log and each automation's Run history show which trigger fired, the result of each condition and each action, and why a run was skipped or failed.
| Result | Meaning |
|---|---|
| Ran | Every action succeeded. |
| Skipped | A condition did not pass, so no actions ran. |
| Failed | A condition could not be checked, or an action failed. |
Credits and limits
Each action is a real call to the Teslemetry API on your account, and is charged and rate limited like the same call from any other app:
- A vehicle command uses 1 command credit. If the vehicle is asleep, Teslemetry wakes it first, which uses 20 more credits.
- Energy site commands, such as changing the Powerwall operating mode or backup reserve, use no credits.
- Conditions never use credits and never wake the vehicle.
An automation runs one at a time: if a trigger fires while it is still running, that run is dropped. An automation holds up to 20 triggers, 20 actions and 30 conditions.
A scheduled time missed during a service outage is not run later, and a hold-for wait does not survive a service restart. If a run matters, check its run history.
Examples
Switch a Powerwall between Self-Powered and Time-Based Control
This is for a site where solar charges the Powerwall during the day, and at night you want the home to use the grid instead, for example while the car charges.
The Tesla app's operating modes appear in the Operating Mode command as:
| Tesla app | Operating Mode command | API value |
|---|---|---|
| Self-Powered | Self consumption | self_consumption |
| Time-Based Control (sometimes called Savings) | Autonomous | autonomous |
Time-Based Control follows the rate plan set up for your site in the Tesla app.
Create two automations:
- Powerwall day mode
- Trigger: At a time, 07:00, every day.
- Action: Run a command, Operating Mode, your energy site, Self consumption.
- Powerwall night mode
- Trigger: At a time, 22:00, every day.
- Action: Run a command, Operating Mode, your energy site, Autonomous.
Set the times to suit you. You can add a Backup command to either automation to change the backup reserve at the same time, for example a higher reserve overnight so the Powerwall keeps its charge for the morning.
Charge the car at night
- Trigger: At a time, 23:00, on the days you want.
- Optional condition: Telemetry value, your vehicle,
BatteryLevelis below 80. - Action: Run a command, Charge Start, your vehicle.
A second automation with Charge Stop at 06:00 ends charging in the morning. The car must be plugged in. Each command uses 1 credit, plus 20 if the car is asleep.
If you only need the car to charge in off-peak hours, the scheduled charging setting in the Tesla app does that on its own and uses no credits. An automation is useful when the schedule depends on something else, such as also switching the Powerwall mode in the same run.
You can combine both examples in one automation: at 22:00, set the Powerwall to Autonomous, then Charge Start on the car.