Skip to content

Commit 782db8f

Browse files
authored
docs: add choice (#20139)
1 parent 36e8dce commit 782db8f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

templates/definition/meter/sonnenbatterie.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ params:
3636
default: self-consumption
3737
advanced: true
3838
help:
39-
de: Standardmodus für die aktive Batteriesteuerung (self-consumption oder time-of-use)
40-
en: Default mode for active battery control (self-consumption or time-of-use)
39+
de: Standardmodus für die aktive Batteriesteuerung
40+
en: Default mode for active battery control
4141
usages: ["battery"]
4242
- name: chargepower
4343
default: 3300

util/templates/documentation.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
- {{ . }}
55
{{- end }}
66
{{- $help := localize .Help | replace "\n" " " -}}
7-
{{- if $help }} # {{ $help }}{{- end }}{{- if not .IsRequired }}{{ if not $help }} # {{ else }} ({{ end }}optional{{ if $help }}){{ end }}{{ end }}
7+
{{- $choices := join ", " .Choice -}}
8+
{{- $optional := not .IsRequired -}}
9+
{{- if or $help $choices $optional }} # {{end}}
10+
{{- if $help }}{{ $help }} {{end}}
11+
{{- if $choices }}[{{ $choices }}] {{end}}
12+
{{- if $optional }}
13+
{{- if or $help $choices }}(optional){{ else }}optional{{end }}
14+
{{- end }}
815
{{- end }}
916

1017
{{- define "header" }}

0 commit comments

Comments
 (0)