diff --git a/templates/definition/meter/sonnenbatterie.yaml b/templates/definition/meter/sonnenbatterie.yaml index b0322d5cf..00097d64a 100644 --- a/templates/definition/meter/sonnenbatterie.yaml +++ b/templates/definition/meter/sonnenbatterie.yaml @@ -36,8 +36,8 @@ params: default: self-consumption advanced: true help: - de: Standardmodus für die aktive Batteriesteuerung (self-consumption oder time-of-use) - en: Default mode for active battery control (self-consumption or time-of-use) + de: Standardmodus für die aktive Batteriesteuerung + en: Default mode for active battery control usages: ["battery"] - name: chargepower default: 3300 diff --git a/util/templates/documentation.tpl b/util/templates/documentation.tpl index a9a1e51b6..74a0af840 100644 --- a/util/templates/documentation.tpl +++ b/util/templates/documentation.tpl @@ -4,7 +4,14 @@ - {{ . }} {{- end }} {{- $help := localize .Help | replace "\n" " " -}} - {{- if $help }} # {{ $help }}{{- end }}{{- if not .IsRequired }}{{ if not $help }} # {{ else }} ({{ end }}optional{{ if $help }}){{ end }}{{ end }} + {{- $choices := join ", " .Choice -}} + {{- $optional := not .IsRequired -}} + {{- if or $help $choices $optional }} # {{end}} + {{- if $help }}{{ $help }} {{end}} + {{- if $choices }}[{{ $choices }}] {{end}} + {{- if $optional }} + {{- if or $help $choices }}(optional){{ else }}optional{{end }} + {{- end }} {{- end }} {{- define "header" }}