A Home Assistant integration for monitoring EnBW electric vehicle charging stations in Germany.
- Easy Configuration: Search nearby stations on a map or enter a station ID directly — one config entry per station
- Custom Friendly Name: Set a custom static part of the sensor's friendly name during setup or reconfiguration. By default, this uses the EVSE code (e.g.
MVV) and station number (e.g.MVV_station_829151). - Single Entity per Station: One sensor per station showing
availableoroccupied, with a dynamic name like2 / 5 - StationName. For stations with more than 9 charge points, the available count is spaced (e.g.1 0 / 10 - StationName). - Charge Point Details: Every charge point's status, power, and connector type exposed as entity attributes
- Occupancy Tracking: Persistent occupancy histograms by hour-of-day and weekday, accumulating over time and surviving restarts
- Map Integration: GPS coordinates as attributes so the sensor appears on the HA map
- Location Data: GPS coordinates and address as attributes on each station sensor
- Click the badge above, or go to HACS → Integrations → search for "SmartCharge"
- Install the integration
- Restart Home Assistant
- Download the integration files into your
custom_componentsdirectory:custom_components/smartcharge/ - Restart Home Assistant
- Go to Settings → Devices & Services
- Click "Add Integration"
- Search for "SmartCharge"
- Choose Search Nearby Stations (recommended) to find stations on a map, or enter a station ID manually
- If searching: drag the map pin to your area, adjust the radius, then pick a station from the results
- Configure the update interval (60–3600 seconds, default 300)
- Optionally set a custom static part of the friendly name. If left blank, the default is the EVSE code and station number (e.g.
MVV_station_829151).
To monitor multiple stations, add the integration once per station.
If you prefer to enter a station ID directly, you can find it using your browser's developer tools:
- Open the EnBW charging map
- Open your browser's developer tools:
- Chrome: Press
F12orCtrl+Shift+I, then go to the Network tab - Firefox: Press
F12orCtrl+Shift+I, then go to the Network tab
- Chrome: Press
- Click on a charging station on the map
- In the Network tab, look for a request to the EnBW API, e.g.:
https://enbw-emp.azure-api.net/emobility-public-api/api/v1/chargestations/134057 - The number at the end of the URL (e.g.
134057) is the station ID
Tip: You can also find the API subscription key in the request headers under
Ocp-Apim-Subscription-Keyif you want to set a manual key in the integration options.
Each config entry (one per station) creates a single sensor. You can reconfigure the integration at any time via the Home Assistant UI (Options):
- State:
available(at least one charge point is free) oroccupied(all charge points in use) - Dynamic Name: Updates to show availability, e.g.
2 / 5 - Hauptstraße 10, Stuttgart. For stations with more than 9 charge points, the available count is spaced (e.g.1 0 / 10 - StationName). - Icon: Switches between
mdi:ev-stationandmdi:ev-station-unavailable
total_charge_points: Total number of charge points at the stationavailable_count: Number of currently available charge pointsoccupied_count: Number of currently occupied charge pointslatitude/longitude: GPS coordinates (enables map display)address: Physical address- Per charge point (keyed by EVSE ID): Status, power in kW, and connector type, e.g.
available | 50 kW | CCS occupancy_weekday: Average occupancy % by day of week (accumulated over time)occupancy_hourly: Average occupancy % by hour of day (accumulated over time)
You can visualize the occupancy data as color-coded bar charts using the Plotly Graph Card (install via HACS → Frontend).
type: custom:plotly-graph
raw_plotly_config: true
defaults:
entity:
type: bar
showlegend: false
marker:
colorscale: Portland
cmin: 0
cmax: 100
xaxes:
type: category
showgrid: true
yaxes:
range: [0, 100]
title: Occupancy %
dtick: 25
showgrid: true
entities:
- entity: &station sensor.YOUR_STATION_availability
name: Hourly
x: $ex Object.keys(meta.occupancy_hourly || {})
"y": $ex Object.values(meta.occupancy_hourly || {})
marker:
color: $ex Object.values(meta.occupancy_hourly || {})
- entity: *station
name: Weekly
x: $ex Object.keys(meta.occupancy_weekday || {})
"y": $ex Object.values(meta.occupancy_weekday || {})
xaxis: x2
yaxis: y2
marker:
color: $ex Object.values(meta.occupancy_weekday || {})
layout:
title: Station Occupancy
height: 500
grid:
rows: 2
columns: 1
subplots: [[xy], [x2y2]]
roworder: top to bottom
xaxis:
dtick: 2Note: Replace
sensor.YOUR_STATION_availabilitywith your actual station entity ID. The YAML anchor (&station/*station) ensures the entity is defined only once. Themetavariable provides direct access to the entity's attributes. Bar colors follow a continuous gradient (Portland colorscale) from low (blue) to high (red) occupancy. Other built-in colorscales:Jet,RdYlGn_r,YlOrRd,Viridis— see Plotly colorscales.
service: smartcharge.refresh_dataautomation:
- alias: "Notify when charging station available"
trigger:
platform: state
entity_id: sensor.my_station_availability
to: "available"
action:
- service: notify.mobile_app_phone
data:
title: "Charging Station Available"
message: >
{{ state_attr('sensor.my_station_availability', 'available_count') }}
charge point(s) now free!- Check that your station ID is correct on the EnBW map
- Verify internet connectivity
- Review Home Assistant logs for errors (
custom_components.smartcharge)
- Check the update interval setting in the integration options
- Verify the API is accessible
- Restart the integration
For community discussions:
MIT License - See LICENSE file for details
For issues and feature requests, please open an issue.
