Skip to content

Tesla BLE: add odometer#31743

Draft
Optic00 wants to merge 1 commit into
evcc-io:masterfrom
Optic00:feat/tesla-ble-odometer
Draft

Tesla BLE: add odometer#31743
Optic00 wants to merge 1 commit into
evcc-io:masterfrom
Optic00:feat/tesla-ble-odometer

Conversation

@Optic00

@Optic00 Optic00 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Adds an odometer source to the tesla-ble vehicle template so the odometer shows up in the UI and session log.

The backing proxy needs support for the drive_state endpoint: wimaha/TeslaBleHttpProxy#160. This PR should not be merged before that one.

The odometer is read via a separate endpoints=drive_state request, so all existing sources keep working unchanged against older proxy versions; on an old proxy only the odometer read fails, which surfaces as one error log line per vehicle identification, same as the other odometer-capable templates when their backend lacks the data.

Scale is 1.60934 (miles to km), matching the range source in the same template.

Tested with go test ./vehicle/ -run TestTemplates and end-to-end against a live proxy implementing the new endpoint: Odometer() returns the car's real odometer reading in km (verified against the vehicle's displayed value), Soc() and Status() unchanged.

@github-actions github-actions Bot added vehicles Specific vehicle support enhancement New feature or request labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request vehicles Specific vehicle support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant