Skip to content

feat: add IEC 61851 text sensor and state mapping#139

Merged
yoziru merged 5 commits into
yoziru:mainfrom
Mamath2000:main
Dec 28, 2025
Merged

feat: add IEC 61851 text sensor and state mapping#139
yoziru merged 5 commits into
yoziru:mainfrom
Mamath2000:main

Conversation

@Mamath2000
Copy link
Copy Markdown
Contributor

I need this sensor for integration with evcc

Copilot AI review requested due to automatic review settings December 2, 2025 17:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Mamath2000
Copy link
Copy Markdown
Contributor Author

Hello, could someone approve the workflows so they can run?

@yoziru yoziru merged commit a3019d2 into yoziru:main Dec 28, 2025
3 checks passed
PhilJaro pushed a commit to PhilJaro/esphome-tesla-ble that referenced this pull request Jan 9, 2026
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.

3 participants