From 56e27fba7c2192a66e9e06ffca8970087165e527 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 13 Apr 2023 19:48:01 +0200 Subject: [PATCH] Add flobz PSA Car Controller (#7369) --- templates/definition/vehicle/flobz.yaml | 40 +++++++++++++++++++++++++ templates/docs/vehicle/flobz_0.yaml | 11 +++++++ templates/evcc.io/brands.json | 1 + 3 files changed, 52 insertions(+) create mode 100644 templates/definition/vehicle/flobz.yaml create mode 100644 templates/docs/vehicle/flobz_0.yaml diff --git a/templates/definition/vehicle/flobz.yaml b/templates/definition/vehicle/flobz.yaml new file mode 100644 index 000000000..f47a63610 --- /dev/null +++ b/templates/definition/vehicle/flobz.yaml @@ -0,0 +1,40 @@ +template: flobz +products: + - brand: PSA + description: + generic: PSA Car Controller (flobz) +params: + - name: host + - name: port + - name: vin + required: true + help: + de: Erforderlich + en: Required + - name: capacity +render: | + type: custom + soc: + {{- include "source" . | indent 2 }} + jq: .energy[0].level + status: + source: combined + plugged: + {{- include "source" . | indent 4 }} + jq: .energy[0].charging.plugged + charging: + {{- include "source" . | indent 4 }} + jq: .energy[0].charging.status == "InProgress" + range: + {{- include "source" . | indent 2 }} + jq: .energy[0].autonomy + odometer: + {{- include "source" . | indent 2 }} + jq: .timed_odometer.mileage + climater: + {{- include "source" . | indent 2 }} + jq: .preconditionning.air_conditioning.status != "Disabled" + {{- define "source" }} + source: http + uri: http://{{ .host }}{{ if .port }}:{{ .port }}{{ end }}/get_vehicleinfo/{{ .vin }}?from_cache=1 + {{- end }} diff --git a/templates/docs/vehicle/flobz_0.yaml b/templates/docs/vehicle/flobz_0.yaml new file mode 100644 index 000000000..8767a37f0 --- /dev/null +++ b/templates/docs/vehicle/flobz_0.yaml @@ -0,0 +1,11 @@ +product: + brand: PSA + description: PSA Car Controller (flobz) +render: + - default: | + type: template + template: flobz + host: 192.0.2.2 # IP-Adresse oder Hostname + port: # Port (Optional) + vin: W... # Erforderlich + capacity: 50 # Akkukapazität in kWh (Optional) diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index 453a5dbb0..469311475 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -172,6 +172,7 @@ "Opel", "Peugeot", "Porsche", + "PSA", "Renault", "Seat", "Silence",