From bb7b72077db5047ef66147b44d59af64dac3558d Mon Sep 17 00:00:00 2001 From: Hofy <68365998+Hofyyy@users.noreply.github.com> Date: Fri, 5 May 2023 19:01:57 +0200 Subject: [PATCH] Add teslamate (#7804) --- templates/definition/vehicle/teslamate.yaml | 53 +++++++++++++++++++++ templates/docs/vehicle/teslamate_0.yaml | 27 +++++++++++ 2 files changed, 80 insertions(+) create mode 100644 templates/definition/vehicle/teslamate.yaml create mode 100644 templates/docs/vehicle/teslamate_0.yaml diff --git a/templates/definition/vehicle/teslamate.yaml b/templates/definition/vehicle/teslamate.yaml new file mode 100644 index 000000000..8054ac88d --- /dev/null +++ b/templates/definition/vehicle/teslamate.yaml @@ -0,0 +1,53 @@ +template: teslamate +products: + - brand: Tesla + description: + generic: A self-hosted data logger for your Tesla (teslamate) +requirements: + description: + en: Required MQTT broker configuration + de: Voraussetzung ist konfigurierter MQTT Broker +params: + - name: title + - name: id + default: 1 + - name: capacity + - name: phases + advanced: true + - name: icon + default: car + advanced: true + - preset: vehicle-identify +render: | + type: custom + {{- if .title }} + title: {{ .title }} + {{- end }} + {{- if .icon }} + icon: {{ .icon }} + {{- end }} + {{- if .capacity }} + capacity: {{ .capacity }} + {{- end }} + {{- if .phases }} + phases: {{ .phases }} + {{- end }} + {{- include "vehicle-identify" . }} + soc: + source: mqtt + topic: teslamate/cars/{{ .id }}/battery_level + timeout: 720h # 30d + status: + source: combined + plugged: + source: mqtt + topic: teslamate/cars/{{ .id }}/plugged_in + timeout: 720h # 30d + charging: + source: mqtt + topic: teslamate/cars/{{ .id }}/charger_actual_current + timeout: 720h # 30d + range: + source: mqtt + topic: teslamate/cars/{{ .id }}/rated_battery_range_km + timeout: 720h # 30d diff --git a/templates/docs/vehicle/teslamate_0.yaml b/templates/docs/vehicle/teslamate_0.yaml new file mode 100644 index 000000000..f661f54de --- /dev/null +++ b/templates/docs/vehicle/teslamate_0.yaml @@ -0,0 +1,27 @@ +product: + brand: Tesla + description: A self-hosted data logger for your Tesla (teslamate) +description: | + Voraussetzung ist konfigurierter MQTT Broker +render: + - default: | + type: template + template: teslamate + title: # Wird in der Benutzeroberfläche angezeigt (Optional) + id: 1 # Optional + capacity: 50 # Akkukapazität in kWh (Optional) + advanced: | + type: template + template: teslamate + title: # Wird in der Benutzeroberfläche angezeigt (Optional) + id: 1 # Optional + capacity: 50 # Akkukapazität in kWh (Optional) + phases: 3 # Die maximale Anzahl der Phasen welche genutzt werden können (Optional) + icon: car # Icon in der Benutzeroberfläche (Optional) + mode: # Möglich sind Off, Now, MinPV und PV, oder leer wenn keiner definiert werden soll (Optional) + minSoc: 25 # Ladung mit maximaler Geschwindigkeit bis zu dem angegeben Ladestand unabhängig PV-Erzeugung, wenn der Lademodus nicht auf 'Aus' steht (Optional) + targetSoc: 80 # Bis zu welchem Ladestand (Soc) soll das Fahrzeug geladen werden (Optional) + minCurrent: 6 # Definiert die minimale Stromstärke pro angeschlossener Phase mit welcher das Fahrzeug geladen werden soll (Optional) + maxCurrent: 16 # Definiert die maximale Stromstärke pro angeschlossener Phase mit welcher das Fahrzeug geladen werden soll (Optional) + identifiers: # Kann meist erst später eingetragen werden, siehe: https://docs.evcc.io/docs/guides/vehicles/#erkennung-des-fahrzeugs-an-der-wallbox (Optional) + priority: # Priorität des Ladepunktes oder Fahrzeugs in Relation zu anderen Ladepunkten oder Fahrzeugen für die Zuweisung von PV-Energie (Optional)