Signed-off-by: Marcel Goerentz <m.goerentz@t-online.de> Co-authored-by: Michael Geers <michael@geers.tv>
41 lines
730 B
Smarty
41 lines
730 B
Smarty
{{ define "vehicle-common" }}
|
|
{{- if .title }}
|
|
title: {{ .title }}
|
|
{{- end }}
|
|
{{- if .icon }}
|
|
icon: {{ .icon }}
|
|
{{- end }}
|
|
{{- if .capacity }}
|
|
capacity: {{ .capacity }}
|
|
{{- end }}
|
|
{{- if .phases }}
|
|
phases: {{ .phases }}
|
|
{{- end }}
|
|
|
|
{{- if or .mode .minCurrent .maxCurrent .maxPower .priority }}
|
|
onIdentify:
|
|
{{- if .mode }}
|
|
mode: {{ .mode }}
|
|
{{- end }}
|
|
{{- if .minCurrent }}
|
|
minCurrent: {{ .minCurrent }}
|
|
{{- end }}
|
|
{{- if .maxCurrent }}
|
|
maxCurrent: {{ .maxCurrent }}
|
|
{{- end }}
|
|
{{- if .maxPower }}
|
|
maxPower: {{ .maxPower }}
|
|
{{- end }}
|
|
{{- if .priority }}
|
|
priority: {{ .priority }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- if len .identifiers }}
|
|
identifiers:
|
|
{{- range .identifiers }}
|
|
- {{ quote . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- end }}
|