Revert "Templates: replace validvalues with choice (BC) (#17653)"
This reverts commit 02cc6899a7.
This commit is contained in:
parent
6db5b66f0e
commit
a6bb2efe7e
29 changed files with 50 additions and 70 deletions
|
|
@ -222,8 +222,7 @@ params:
|
|||
de: "'de' für Deutsch und 'en' für Englisch"
|
||||
en: "'en' for English and 'de' for German"
|
||||
default: en
|
||||
type: choice
|
||||
choice: ["en", "de"]
|
||||
validvalues: ["de", "en"]
|
||||
- name: icon
|
||||
description:
|
||||
de: Icon
|
||||
|
|
@ -232,7 +231,7 @@ params:
|
|||
de: "Icon in der Benutzeroberfläche"
|
||||
en: "Icon as shown in user interface"
|
||||
type: choice
|
||||
choice:
|
||||
validvalues:
|
||||
- car
|
||||
- bike
|
||||
- bus
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ type Param struct {
|
|||
Values []string `json:",omitempty"` // user provided list of values e.g. for Type "list"
|
||||
Usages []string `json:",omitempty"` // restrict param to these usage types, e.g. "battery" for home battery capacity
|
||||
Type ParamType // string representation of the value type, "string" is default
|
||||
ValidValues []string `json:",omitempty"` // list of valid values the user can provide
|
||||
Choice []string `json:",omitempty"` // defines a set of choices, e.g. "grid", "pv", "battery", "charge" for "usage"
|
||||
AllInOne *bool `json:"-"` // defines if the defined usages can all be present in a single device
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue