Skip to content

Commit 7e737d4

Browse files
authored
Home Assistant integration, entity usage, ... (#1012)
1 parent eeca7aa commit 7e737d4

2 files changed

Lines changed: 117 additions & 96 deletions

File tree

docs/integrations/home-assistant.mdx

Lines changed: 58 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,80 +2,90 @@
22
sidebar_position: 3
33
---
44

5-
import Tabs from "@theme/Tabs";
6-
import TabItem from "@theme/TabItem";
7-
85
# Home Assistant
96

10-
Hier erfährst du, wie du evcc-Daten in Home Assistant visualisieren und Automatisierungen erstellen kannst.
7+
Home Assistant sammelt und visualisiert Daten aus deinem Smart Home und bietet umfangreiche Automatisierungsmöglichkeiten.
8+
evcc ist auf intelligentes Laden und Heizen spezialisiert.
9+
Beide Systeme ergänzen sich und lassen sich auf verschiedene Arten miteinander verbinden.
10+
11+
:::note
12+
evcc kann auch als Home Assistant Addon installiert werden. Die Anleitung dafür findest du [hier](../installation/home-assistant).
13+
:::
1114

12-
Diese Anleitung setzt voraus, dass du evcc und Home Assistant bereits installiert hast.
13-
Wenn du nach einer Installationsanleitung suchst, findest du diese unter [Installation → Home Assistant Addon](../installation/home-assistant).
15+
## Visualisieren & Automatisieren {#control-evcc}
1416

15-
## Schnittstellen
17+
evcc bringt viele Steuerungen für intelligentes Laden und Heizen mit, kann aber nicht alle Anwendungsfälle abdecken.
18+
Durch die Integration mit Home Assistant bekommst du mehr Flexibilität.
19+
Hier ein paar Beispiele:
1620

17-
Falls du Geräte, wie Chargers, Meters oder Fahrzeuge, in evcc integrieren möchtest die von Geräten stammen die evcc nicht
18-
unterstützt (z. B. Zigbee Smartplugs) kannst du dies über [MQTT](./mqtt-api) oder das
19-
[REST API](./rest-api) realisieren.
21+
- Messwerte in Dashboards visualisieren
22+
- Ladepläne basierend auf Kalendereinträgen erstellen
23+
- Lademodus abhängig von Anwesenheit wechseln
24+
- ...
2025

21-
Dank der beiden evcc Schnittstellen können zusätzliche Ladepunkte für eine Vielzahl von verschiebbaren Lasten (Verbrauchern),
22-
wie Heizgeräte, Waschmaschinen, Geschirrspüler oder Elektro-Zweiräder realisiert werden.
26+
### Home Assistant evcc Integration (empfohlen) {#ha-evcc}
2327

24-
## Option 1: ha-evcc Integration
28+
Die [ha-evcc](https://github.com/marq24/ha-evcc) Integration von [marq24](https://github.com/marq24) bringt evcc-Daten und -Funktionen direkt in Home Assistant.
29+
Das funktioniert unabhängig davon, ob du evcc als Home Assistant Addon betreibst oder nicht.
30+
Voraussetzung ist, dass Home Assistant und evcc im gleichen Netzwerk erreichbar sind.
2531

26-
Mit der [ha-evcc](https://github.com/marq24/ha-evcc) Integration von [marq24](https://github.com/marq24) kannst du evcc Daten und Funktionen einfach in Home Assistant integrieren.
27-
Unabhängig davon, ob du evcc in Home Assistant betreibst oder nicht.
32+
Die Integration stellt alle relevanten evcc-Entitäten bereit: Messwerte, Einstellungen, Ladepunkte und Fahrzeuge.
33+
Nach der Installation bekommst du eine umfangreiche Liste an Entitäten, die du in Dashboards und Automationen verwenden kannst.
2834

29-
Die Integration unterstützt alle notwendigen von evcc via API bereitgestellten Entitäten, auch diese zur Anpassung der
30-
evcc Einstellungen, Ladepunkte und der entsprechenden Fahrzeuge.
35+
**Installation über HACS:**
3136

32-
Nach der Installation bekommst du eine lange Liste aller Entitäten die du in Home Assistant nutzen kannst.
37+
1. [HACS](https://hacs.xyz/) in Home Assistant öffnen und nach „evcc" suchen.
38+
2. Den Eintrag **evcc☀️🚘- Solar Charging** von marq24 installieren.
39+
3. Home Assistant neu starten.
40+
4. Unter **Einstellungen → Geräte & Dienste → Integration hinzufügen** nach „evcc" suchen und die URL deiner evcc-Instanz angeben.
3341

34-
## Option 2: manuelle MQTT-Integration
42+
Weitere Installationsvarianten und Details findest du im [GitHub-Repository](https://github.com/marq24/ha-evcc).
3543

36-
MQTT ist ein einfaches Kommunikationsprotokoll, das für das Internet der Dinge (IoT) entwickelt wurde.
37-
Der Weg über MQTT ist etwas einfacher als über die REST-API, aber falls du noch nie mit MQTT gearbeitet hast,
38-
gilt es ein paar Punkte zu beachten.
44+
### Manuelle Integration {#manual}
3945

40-
### Vorbereitung
46+
Alternativ kannst du evcc-Daten manuell über die REST API oder MQTT in Home Assistant einbinden.
4147

42-
Du benötigst einen MQTT-Broker.
43-
Dieser ist ein zentraler Knoten, der Nachrichten zwischen verschiedenen Clients vermittelt.
44-
Ein sehr beliebter und einfacher Broker ist [Mosquitto](https://mosquitto.org/).
45-
Dieser lässt sich bspw. auch als Home Assistant Addon installieren (siehe [Anleitung](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger)).
48+
#### REST API {#rest}
4649

47-
Hast du einen Broker installiert, kannst du mit einem Tool wie [MQTT Explorer](http://mqtt-explorer.com) die Nachrichten auf dem Broker ansehen und verfolgen.
50+
evcc bietet eine [REST API](/docs/integrations/rest-api) an.
51+
[Diese Anleitung](https://github.com/marq24/ha-evcc/blob/main/HA_AS_EVCC_SOURCE.md) von [marq24](https://github.com/marq24) beschreibt die Einbindung in Home Assistant im Detail.
4852

49-
### evcc MQTT Konfiguration
53+
#### MQTT {#mqtt}
5054

51-
Als nächste müssen wir evcc mitteilen, dass es seine Daten an diesen Broker schicken soll.
52-
Dazu müssen in der `evcc.yaml` Datei die entsprechenden Zugangsdaten hinzugefügt werden.
55+
Du benötigst einen MQTT-Broker (z. B. [Mosquitto](https://mosquitto.org/), auch als Home Assistant Addon verfügbar).
5356

54-
```yaml title="evcc.yaml"
55-
mqtt:
56-
broker: <broker-ip>:1883
57-
topic: evcc # root topic for publishing, set empty to disable
58-
user: mosquitto
59-
password: yourpassword
60-
```
57+
Konfiguriere in evcc unter **Konfiguration → MQTT** die Verbindung zum Broker.
58+
In Home Assistant muss der gleiche Broker und das gleiche Topic konfiguriert sein, damit beide Systeme die Daten austauschen können.
6159

62-
Nach einem Neustart von evcc solltest du im MQTT Explorer die bereitgestellten evcc Topics sehen können.
60+
Mit einem Tool wie [MQTT Explorer](http://mqtt-explorer.com) kannst du prüfen, ob die Daten korrekt ankommen.
61+
Eine Anleitung zur Einrichtung von MQTT-Sensoren in Home Assistant findest du im [Blog von Alkly](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger).
6362

64-
![Screenshot von MQTT Explorer mit evcc Topics](screenshots/mqtt-explorer.webp)
63+
Die verfügbaren Topics sind in der [MQTT API](/docs/integrations/mqtt-api) dokumentiert.
6564

66-
Nun können wir diese Daten in Home Assistant integrieren.
65+
## Home Assistant Entitäten nutzen {#ha-entities-in-evcc}
6766

68-
### Home Assistant MQTT Konfiguration
67+
evcc kann sich direkt mit Home Assistant verbinden und dessen Entitäten (Sensoren, Schalter, Zahlenwerte) als Datenquelle verwenden.
68+
So lassen sich z. B. Geräte in evcc einbinden, die nicht direkt unterstützt werden, wie Zigbee-Smartplugs, Sensoren aus anderen Integrationen oder selbstgebaute Lösungen.
69+
Solange die Daten als Home Assistant Entität vorliegen, kann evcc damit arbeiten.
6970

70-
Eine gute Anleitung, wie du MQTT in Home Assistant einrichtest, findest du im [Blog Artikel von Alkly](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger).
71-
Hier gibt es auch Beispiele, wie du aus bestimmten Messwerten (bspw. der Ladeleistung) eine Home Assistant Entität erstellen kannst.
71+
### Einrichtung {#setup}
7272

73-
## Option 3: manuelle REST Integration
73+
1. In der evcc-Oberfläche ein neues Gerät anlegen (z. B. **Konfiguration → Zusätzlichen Zähler hinzufügen**)
74+
2. Als Hersteller „Home Assistant" auswählen
75+
3. evcc erkennt deine Home Assistant Instanz automatisch im Netzwerk
76+
4. Autorisierung von evcc in Home Assistant durchführen (neuer Tab)
77+
5. Den angezeigten Feldern (z. B. „Leistung") Home Assistant Entitäten zuweisen
78+
- Du bekommst Vorschläge und Autovervollständigung (z. B. `sensor.inverter_power`)
79+
- Entitäten müssen rein numerische Werte liefern (`1234`, nicht `1234 W`)
80+
- Um das Vorzeichen zu invertieren, stelle dem Entitätsnamen ein `-` voran (`-sensor.inverter_power`)
7481

75-
Du kannst evcc Daten auch über die REST API in Home Assistant integrieren.
76-
Die verfügbaren Endpunkte findest du unter [REST API](/docs/integrations/rest-api).
82+
### Unterstützte Gerätetypen {#device-types}
7783

78-
[Diese Anleitung](https://github.com/marq24/ha-evcc/blob/main/HA_AS_EVCC_SOURCE.md) von [marq24](https://github.com/marq24) gibt dir detaillierte Informationen wie das geht.
84+
- **[Zähler](/docs/devices/meters#home-assistant)** (Netz, PV, Batterie, ...) mit Leistung, Energie, Strömen, Spannungen, SoC
85+
- **[Wallboxen](/docs/devices/chargers#home-assistant-charger)** mit Status, Ein-/Ausschalten und maximalem Ladestrom
86+
- **[Schaltbare Steckdosen](/docs/devices/smartswitches#home-assistant-switch)** mit einfacher Ein-/Aus-Steuerung (für Smartplugs, Relais)
87+
- **[Fahrzeuge](/docs/devices/vehicles#home-assistant)** mit SoC, Reichweite, Status, Kilometerstand; optional Skripte zum Starten/Stoppen
88+
- **[Benachrichtigungen](/docs/reference/configuration/messaging)** unter **Konfiguration → Benachrichtigungen** kannst du evcc-Meldungen über Home Assistant versenden
7989

8090
## Weitere Ressourcen (Videos)
8191

i18n/en/docusaurus-plugin-content-docs/current/integrations/home-assistant.mdx

Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,91 @@
11
---
2-
fsidebar_position: 3
2+
sidebar_position: 3
33
---
44

5-
import Tabs from "@theme/Tabs";
6-
import TabItem from "@theme/TabItem";
7-
85
# Home Assistant
96

10-
Learn how to visualize evcc data in Home Assistant and create automations.
7+
Home Assistant collects and visualises data from your smart home and offers extensive automation capabilities.
8+
evcc specialises in smart charging and heating.
9+
Both systems complement each other and can be connected in different ways.
10+
11+
:::note
12+
evcc can also be installed as a Home Assistant Addon. You can find the instructions [here](../installation/home-assistant).
13+
:::
1114

12-
This guide assumes that you have already installed evcc and Home Assistant.
13-
If you are looking for installation instructions, you can find them under [Installation → Home Assistant Addon](../installation/home-assistant).
15+
## Visualise & Automate {#control-evcc}
1416

15-
## APIs
17+
evcc comes with many controls for smart charging and heating but can't cover every use case.
18+
Integrating with Home Assistant gives you more flexibility.
19+
Here are some examples:
1620

17-
If you want to integrate devices such as chargers, meters, or vehicles into evcc that come from devices that evcc doesn't
18-
support (e.g., Zigbee smart plugs), you can do this via [MQTT](./mqtt-api) or the [REST API](./rest-api).
21+
- Visualise measurements in dashboards
22+
- Create charging plans based on calendar events
23+
- Switch charging modes based on presence
24+
- ...
1925

20-
Thanks to these two evcc APIs, additional charging points can be implemented for a variety of deferrable loads (consumers),
21-
such as heating devices, washing machines, dishwashers, or electric scooters.
26+
### Home Assistant evcc Integration (Recommended) {#ha-evcc}
2227

23-
## Option 1: ha-evcc Integration
28+
The [ha-evcc](https://github.com/marq24/ha-evcc) integration by [marq24](https://github.com/marq24) brings evcc data and functions directly into Home Assistant.
29+
This works regardless of whether you run evcc as a Home Assistant addon or not.
30+
The only requirement is that Home Assistant and evcc are reachable on the same network.
2431

25-
With the [ha-evcc](https://github.com/marq24/ha-evcc) integration by [marq24](https://github.com/marq24), you can easily integrate evcc data and functions into Home Assistant.
26-
This works regardless of whether you run evcc in Home Assistant or not.
32+
The integration provides all relevant evcc entities: measurements, settings, charging points, and vehicles.
33+
After installation, you get a comprehensive list of entities that you can use in dashboards and automations.
2734

28-
The integration supports all necessary entities provided by evcc via API, including those for customizing
29-
evcc settings, charging points, and the corresponding vehicles.
35+
**Installation via HACS:**
3036

31-
After installation, you'll get a long list of all entities that you can use in Home Assistant.
37+
1. Open [HACS](https://hacs.xyz/) in Home Assistant and search for "evcc".
38+
2. Install the entry **evcc☀️🚘- Solar Charging** by marq24.
39+
3. Restart Home Assistant.
40+
4. Go to **Settings → Devices & Services → Add Integration**, search for "evcc", and enter the URL of your evcc instance.
3241

33-
## Option 2: Manual MQTT Integration
42+
For additional installation options and details, see the [GitHub repository](https://github.com/marq24/ha-evcc).
3443

35-
MQTT is a simple communication protocol developed for the Internet of Things (IoT).
36-
The MQTT approach is somewhat easier than using the REST API, but if you've never worked with MQTT before,
37-
there are a few points to consider.
44+
### Manual Integration {#manual}
3845

39-
### Preparation
46+
Alternatively, you can manually integrate evcc data into Home Assistant via the REST API or MQTT.
4047

41-
You need an MQTT broker.
42-
This is a central node that mediates messages between different clients.
43-
A very popular and simple broker is [Mosquitto](https://mosquitto.org/).
44-
This can also be installed as a Home Assistant addon (see [guide (German)](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger)).
48+
#### REST API {#rest}
4549

46-
Once you have installed a broker, you can use a tool like [MQTT Explorer](http://mqtt-explorer.com) to view and track messages on the broker.
50+
evcc offers a [REST API](/docs/integrations/rest-api).
51+
[This guide](https://github.com/marq24/ha-evcc/blob/main/HA_AS_EVCC_SOURCE.md) by [marq24](https://github.com/marq24) describes the integration with Home Assistant in detail.
4752

48-
### evcc MQTT Configuration
53+
#### MQTT {#mqtt}
4954

50-
Next, we need to tell evcc to send its data to this broker.
51-
To do this, the corresponding credentials must be added to the `evcc.yaml` file.
55+
You need an MQTT broker (e.g. [Mosquitto](https://mosquitto.org/), also available as a Home Assistant addon).
5256

53-
```yaml title="evcc.yaml"
54-
mqtt:
55-
broker: <broker-ip>:1883
56-
topic: evcc # root topic for publishing, set empty to disable
57-
user: mosquitto
58-
password: yourpassword
59-
```
57+
Configure the broker connection in evcc under **Configuration → MQTT**.
58+
The same broker and topic must be configured in Home Assistant so that both systems can exchange data.
6059

61-
After restarting evcc, you should be able to see the provided evcc topics in MQTT Explorer.
60+
You can use a tool like [MQTT Explorer](http://mqtt-explorer.com) to verify that topics are arriving correctly.
61+
A guide on setting up MQTT sensors in Home Assistant is available in the [blog by Alkly (German)](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger).
6262

63-
![Screenshot of MQTT Explorer with evcc topics](screenshots/mqtt-explorer.webp)
63+
The available topics are documented in the [MQTT API](/docs/integrations/mqtt-api).
6464

65-
Now we can integrate this data into Home Assistant.
65+
## Using Home Assistant Entities {#ha-entities-in-evcc}
6666

67-
### Home Assistant MQTT Configuration
67+
evcc can connect directly to Home Assistant and use its entities (sensors, switches, numbers) as data sources.
68+
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.
69+
As long as the data is available as a Home Assistant entity, evcc can work with it.
6870

69-
You can find a good guide on how to set up MQTT in Home Assistant in the [Blog Article by Alkly (German)](https://alkly.de/mqtt-mit-home-assistant-fuer-anfaenger).
70-
It also includes examples of how to create a Home Assistant entity from certain measurements (e.g., charging power).
71+
### Setup {#setup}
7172

72-
## Option 3: Manual REST Integration
73+
1. Add a new device in the evcc UI (e.g. **Configuration → Add additional meter**)
74+
2. Select "Home Assistant" as the manufacturer
75+
3. evcc will automatically discover your Home Assistant instance on the network
76+
4. Authorise evcc in Home Assistant (new tab)
77+
5. Assign Home Assistant entities to the presented fields (e.g. "Power")
78+
- You'll get suggestions and autocomplete (e.g. `sensor.inverter_power`)
79+
- Entities must return pure numeric values (`1234`, not `1234 W`)
80+
- To invert the sign, prepend `-` to the entity name (`-sensor.inverter_power`)
7381

74-
You can also integrate evcc data into Home Assistant via the REST API.
75-
You can find the available endpoints under [REST API](/docs/integrations/rest-api).
82+
### Supported Device Types {#device-types}
7683

77-
[This guide](https://github.com/marq24/ha-evcc/blob/main/HA_AS_EVCC_SOURCE.md) by [marq24](https://github.com/marq24) gives you detailed information on how to do this.
84+
- **[Meters](/docs/devices/meters#home-assistant)** (grid, solar, battery, ...) with power, energy, currents, voltages, SoC
85+
- **[Chargers](/docs/devices/chargers#home-assistant-charger)** with status, enable/disable, and maximum charging current
86+
- **[Smart switches](/docs/devices/smartswitches#home-assistant-switch)** with simple on/off control (for smart plugs, relays)
87+
- **[Vehicles](/docs/devices/vehicles#home-assistant)** with SoC, range, status, odometer; optionally scripts for start/stop
88+
- **[Notifications](/docs/reference/configuration/messaging)** under **Configuration → Notifications** you can send evcc messages via Home Assistant
7889

7990
## Further Resources (Videos)
8091

0 commit comments

Comments
 (0)