Skip to content

Add parked charge current and departure preconditioning - #23

Merged
itbird merged 2 commits into
mainfrom
cursor/charge-amps-departure-0636
Nov 13, 2026
Merged

itbird merged 2 commits into
mainfrom
cursor/charge-amps-departure-0636

Conversation

@itbird

@itbird itbird commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • charge-amps <amps> sets the charging current through upstream tesla-control charging-set-amps (set_charging_amps). The value is a whole number from 1 to 80. The car may clamp it to what the charger allows. The confirmation is I confirm charging set amps.
  • departure show reads preconditioning_schedule_data and does not wake a sleeping car.
  • departure set signs precondition-schedule-add (add_precondition_schedule). The confirmation is I confirm departure schedule set. Latitude and longitude are optional. Pass both, or omit both to use the car's current precise location from location_data. That read happens after the same wake other parked changes use. If the location read says the car is asleep, it is not woken again.
  • departure remove signs precondition-schedule-remove with type id. The confirmation is I confirm departure schedule remove.
  • where stays a non-waking coarse area. where --precise prints latitude, longitude, and an OpenStreetMap link when the car is already online, and it still does not wake the car.
  • Precise coordinates are used only for those two asks. They are not written to the local history. History still has no coordinate columns.
  • The installer does not add a tesla-control patch. The older set_scheduled_departure command is not sent. Park and speed 0 still apply to the changes. A schedule cannot run them. check, report, where, and history still do not wake a sleeping car. precondition stays immediate climate-on.

Test plan

  • pytest -q (201 passed)
  • Omitting departure coordinates reads location_data after the write wake, and a 408 on that read is not followed by another wake
  • Explicit coordinates are still accepted and validated (latitude -90 to 90, longitude -180 to 180)
  • where --precise prints the point and a map link, does not wake, and does not call Nominatim
  • The history schema has no coordinate columns, and a saved snapshot still contains none
  • Confirmation, schedule blocking, and the non-waking reads from the first commit still hold
Open in Web Open in Cursor 

charge-amps sends the upstream charging-set-amps command. departure show, set, and remove use precondition-schedule-add and precondition-schedule-remove. A show does not wake the car. Changes need a confirmation and cannot be scheduled.
departure set can omit latitude and longitude and read the car's current location. where --precise prints that point and a map link without waking the car. History still stores no coordinates.
@itbird
itbird merged commit e7c36a8 into main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant