Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Dec 24, 2024
2 parents ef2aaff + 8a4108c commit 3e73934
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ Example Use Case: With SMA Home Manager, there can be a SMA Energy Meter used fo

- `string`: for string values (default)
- `bool`: for `true` and `false` values. If `help` is provided, than that help text is presented as the question
- `number`: for int values
- `int`: for int values
- `float`: for float values
- `stringlist`: for a list of strings, e.g.used for defining a list of `identifiers` for `vehicles`
- `list`: for a list of strings, e.g.used for defining a list of `identifiers` for `vehicles`
- `chargemodes`: for a selection of charge modes (including `None` which results in the param not being set)

### `advanced`
Expand Down
8 changes: 4 additions & 4 deletions templates/definition/common-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"number",
"float",
"int",
"stringlist",
"list",
"chargemodes",
"duration"
]
Expand Down Expand Up @@ -293,9 +293,9 @@
"enum": [
"string",
"bool",
"number",
"int",
"float",
"stringlist",
"list",
"chargemodes",
"duration"
]
Expand Down Expand Up @@ -371,4 +371,4 @@
"title": "ParamDependency"
}
}
}
}
2 changes: 1 addition & 1 deletion util/templates/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ type Param struct {
Default string `json:",omitempty"` // default value if no user value is provided in the configuration
Example string `json:",omitempty"` // cli example value
Value string `json:"-"` // user provided value via cli configuration
Values []string `json:",omitempty"` // user provided list of values e.g. for Type "stringlist"
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
Expand Down

0 comments on commit 3e73934

Please sign in to comment.