Skip to content
EN | DE

Home Assistant

Home Assistant collects and visualises data from your smart home and offers extensive automation capabilities. evcc specialises in smart charging and heating. Both systems complement each other and can be connected in different ways.

evcc comes with many controls for smart charging and heating but can’t cover every use case. Integrating with Home Assistant gives you more flexibility. Here are some examples:

  • Visualise measurements in dashboards
  • Create charging plans based on calendar events
  • Switch charging modes based on presence
Section titled “Home Assistant evcc Integration (Recommended)”

The ha-evcc integration by marq24 brings evcc data and functions directly into Home Assistant. This works regardless of whether you run evcc as a Home Assistant app or not. The only requirement is that Home Assistant and evcc are reachable on the same network.

The integration provides all relevant evcc entities: measurements, settings, charging points, and vehicles. After installation, you get a comprehensive list of entities that you can use in dashboards and automations.

Installation via HACS:

  1. Open HACS in Home Assistant and search for “evcc”.
  2. Install the entry evcc☀️🚘- Solar Charging by marq24.
  3. Restart Home Assistant.
  4. Go to Settings → Devices & Services → Add Integration, search for “evcc”, and enter the URL of your evcc instance.

For additional installation options and details, see the GitHub repository.

For dashboards, the hass-evcc-card provides a Lovelace card that shows the evcc overview in Home Assistant.

Alternatively, you can manually integrate evcc data into Home Assistant via the REST API or MQTT.

evcc offers a REST API. This guide by marq24 describes the integration with Home Assistant in detail.

You need an MQTT broker (e.g. Mosquitto, also available as a Home Assistant app).

Configure the broker connection in evcc under Configuration → MQTT. The same broker and topic must be configured in Home Assistant so that both systems can exchange data.

You can use a tool like MQTT Explorer to verify that topics are arriving correctly. A guide on setting up MQTT sensors in Home Assistant is available in the blog by Alkly (German).

The available topics are documented in the MQTT API.

evcc can connect directly to Home Assistant and use its entities (sensors, switches, numbers) as data sources. This allows you to integrate devices into evcc that are not natively supported, e.g. Zigbee smart plugs, sensors from other integrations, or DIY solutions. As long as the data is available as a Home Assistant entity, evcc can work with it.

  • Meters (grid, solar, battery, …) with power, energy, currents, voltages, SoC
  • Chargers with status, enable/disable, and maximum charging current
  • Smart switches with simple on/off control (for smart plugs, relays)
  • Vehicles with SoC, range, status, odometer; optionally scripts for start/stop
  • Notifications under Configuration → Notifications you can send evcc messages via Home Assistant

Home Assistant devices are added like any other device in the configuration UI.

  1. Go to Configuration and add a device, e.g. Add additional meter.
  2. Select “Home Assistant” as the manufacturer.
  3. Pick your instance. Instances in the local network are discovered automatically. If the list stays empty, e.g. because Home Assistant runs in a different subnet, enter the address manually (http://homeassistant.local:8123).
  4. Authorise the access. Home Assistant opens in a new tab where you log in and confirm the request. The token is stored by your evcc instance and renewed automatically.
  5. Assign an entity to each field, e.g. “Power”. You get autocomplete with the entities of your instance, and only entities that fit the field are offered.
  6. Validate & save checks whether the entities can be read.

Each field expects a certain kind of value. An entity reporting unknown or unavailable counts as temporarily not available and is read again on the next update.

Power, energy, current and SoC fields need a plain number as state, e.g. 1234. A state such as 1234 W can’t be read, the unit belongs into the entity’s unit_of_measurement attribute. W/kW and Wh/kWh/MWh are converted automatically. To invert the sign, prepend - to the entity name (-sensor.inverter_power).

The enabled state of a charger, a smart switch and similar fields accept on, true, 1, active and yes, as well as their counterparts off, false, 0, inactive and no.

Chargers and vehicles need a status entity that reports whether the vehicle is disconnected, connected or charging. These states are understood out of the box:

StatusMeaningStates
Adisconnecteda, disconnected, not_plugged
Bconnectedb, connected, plugged, starting, stopped, paused, complete, charging_completed
Cchargingc, charging

Many integrations use their own wording. If the entity reports a state that isn’t in the table, the log shows the raw value together with the entity name. Add that value to the matching States for status A/B/C field in the advanced options of the device. Multiple values are separated by commas, upper and lower case don’t matter.

statusB: charging_stopped, charging_error
statusC: instant_charging

A binary_sensor as status entity also needs an explicit mapping, e.g. statusA: off and statusC: on.

Videos are in German.