feat: add IEC 61851 text sensor and state mapping#139
Merged
Conversation
added 3 commits
December 2, 2025 18:12
Contributor
There was a problem hiding this comment.
Pull request overview
Add an IEC 61851 text sensor to expose standardized EVSE state mapping (A/B/C/D/E/F) based on Tesla infotainment charging states, enabling integration with tools like evcc.
- Introduces a new text sensor for IEC 61851 state.
- Maps Tesla charging states to IEC 61851 codes and publishes updates.
- Wires configuration and sensor setup through the component stack and documents usage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| components/tesla_ble_vehicle/vehicle_state_manager.h | Adds member and setter for the IEC 61851 text sensor and declares the state mapping function to support publishing IEC codes. |
| components/tesla_ble_vehicle/vehicle_state_manager.cpp | Implements IEC 61851 mapping and sensor publishing within charge state updates to provide the standardized EVSE state. |
| components/tesla_ble_vehicle/tesla_ble_vehicle.h | Adds setter and pending pointer for the IEC 61851 sensor so it can be configured and passed to the state manager. |
| components/tesla_ble_vehicle/tesla_ble_vehicle.cpp | Wires pending sensor configuration and the setter to forward the IEC 61851 sensor to the state manager. |
| components/tesla_ble_vehicle/init.py | Creates the IEC 61851 text sensor with name and icon, and registers it with the C++ component. |
| README.md | Documents the new IEC 61851 text sensor, including state mapping details and its appearance in Home Assistant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Hello, could someone approve the workflows so they can run? |
yoziru
approved these changes
Dec 26, 2025
PhilJaro
pushed a commit
to PhilJaro/esphome-tesla-ble
that referenced
this pull request
Jan 9, 2026
Add Hungarian localization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I need this sensor for integration with evcc