From d47f97d2f085bb4d0a652dd5f6758ce0f6200509 Mon Sep 17 00:00:00 2001 From: Eugen Date: Mon, 25 Mar 2024 22:20:19 +0100 Subject: [PATCH] Add TeslaLogger vehicle (#13046) --- templates/definition/vehicle/teslalogger.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 templates/definition/vehicle/teslalogger.yaml diff --git a/templates/definition/vehicle/teslalogger.yaml b/templates/definition/vehicle/teslalogger.yaml new file mode 100644 index 0000000000..f1e65b8945 --- /dev/null +++ b/templates/definition/vehicle/teslalogger.yaml @@ -0,0 +1,84 @@ +template: teslalogger +products: + - description: + generic: TeslaLogger +group: generic +requirements: + description: + de: Open Source Tesla Datenlogger https://github.com/bassmaster187/TeslaLogger + en: Open source Tesla data logger https://github.com/bassmaster187/TeslaLogger +params: + - name: title + - name: id + description: + de: TeslaLogger CarID + en: TeslaLogger CarID + default: 1 + - name: url + required: true + example: http://192.0.2.2 + - name: port + example: 5000 + default: 5000 + - 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: # battery soc (%) + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .battery_level + status: + source: combined + plugged: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .plugged_in + charging: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .charging + range: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .battery_range_km + odometer: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .odometer + climater: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .is_preconditioning + getMaxCurrent: + source: http + uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }} + jq: .charge_current_request + wakeup: + source: http + uri: {{ .url }}:{{ .port }}/command/{{ .id }}/wake_up + chargeEnable: + source: http + uri: {{ .url }}:{{ .port }}/command/{{ .id }}/charge_start_stop?${enable} + maxcurrent: + source: http + uri: {{ .url }}:{{ .port }}/command/{{ .id }}/set_charging_amps?${maxcurrent}