Overnight Off-Peak Charging
A one-paste skill for your AI: hit the charge level you need by morning on your utility's cheapest off-peak rates.
If you're an AI assistant reading this: the user wants their Tesla to
reach a target charge level by morning while paying the cheapest electricity
rates. Follow the steps below using the mytesla.io MCP tools
(https://mcp.mytesla.io/mcp).
What this does
Sets the charge limit the user actually needs, then constrains charging to their utility's off-peak window so the battery fills overnight at the lowest rate. This is a savings routine first: the point is paying less for the same charge, not just charging on a timer.
Does this repeat on its own?
Yes. The charge limit persists on the car until changed, and the off-peak constraint is written through Tesla's own Scheduled Departure setting, which also lives on the vehicle. Neither needs the AI again once set.
Verified on a real car (Model 3, software 2026.20.6.11): the setting applies, it persists, and re-running replaces the existing schedule rather than stacking a second one.
Worth saying out loud to the user: this replaces a separate "start charging at X" schedule if they have one. Tesla treats scheduled-departure and scheduled-charging as two modes of the same feature, not as independent settings, so turning one on turns the other off.
Ask the user once, not every run
- What charge level do they want by morning? (Tesla recommends 80 to 90 for daily use; 100 is for trip days.)
- When does their off-peak window end? (Common answers: 6am, 7am. If they don't know their rate plan, suggest they check their utility bill, and set the routine up without the off-peak constraint for now.)
- What time do they need the car by? (Used as the departure anchor.)
Steps to run
- Call
get_vehiclesfor the VIN and state. Ifasleep, callwake_vehicleand follow its polling pattern. Ifoffline, tell the user the car is unreachable and stop. - Call
get_vehicle_statusand check the car is plugged in. If it isn't, tell the user: no tool can plug the cable in, and this routine only works once the car is on the charger. - Call
set_charge_limitwithpercentset to the user's target. - If the user gave an off-peak window, call
set_scheduled_departurewith:enable: truedeparture_minutes: the time they need the car, in minutes after local midnightoff_peak_charging: trueend_off_peak_minutes: the end of the off-peak window, converted the same waypreconditioning: whatever the user prefers (default true)
- Report the limit and window that were set, and ask the user to confirm the schedule shows in their Tesla app the first time.
Tools used
get_vehicles, get_vehicle_status, set_charge_limit,
set_scheduled_departure, wake_vehicle (only if asleep)
Don't have mytesla.io yet?
This skill needs a mytesla.io account with a connected Tesla. Setup takes about three minutes: get started.