From a1b1147b59663733a9c00aba301ebf86bccd1011 Mon Sep 17 00:00:00 2001 From: andig Date: Sat, 15 Apr 2023 17:04:37 +0200 Subject: [PATCH] Flobz: add default attributes --- templates/definition/vehicle/flobz.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/definition/vehicle/flobz.yaml b/templates/definition/vehicle/flobz.yaml index 0c380932d..91c10fcbd 100644 --- a/templates/definition/vehicle/flobz.yaml +++ b/templates/definition/vehicle/flobz.yaml @@ -21,6 +21,19 @@ params: - 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: {{- include "source" . | indent 2 }} jq: .energy[0].level @@ -45,4 +58,3 @@ render: | source: http uri: http://{{ .host }}{{ if .port }}:{{ .port }}{{ end }}/get_vehicleinfo/{{ .vin }}?from_cache=1 {{- end }} - {{ include "vehicle-identify" . }}