mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-16 13:56:29 +00:00
Document icon for data entry sections (#2292)
* Document icon for data entry sections * Try to find reason for build error * Update data_entry_flow_index.md * tiny tweak --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
a4fff7c05d
commit
e93d47c363
@ -153,9 +153,12 @@ class ExampleConfigFlow(data_entry_flow.FlowHandler):
|
||||
|
||||
#### Grouping of input fields
|
||||
|
||||
As shown in the example above, input fields can be visually grouped in sections. Grouping input fields by sections influence
|
||||
both how the inputs are displayed to the user and how user input is structured. In the example above, user input will be
|
||||
structured like this:
|
||||
As shown in the example above, input fields can be visually grouped in sections.
|
||||
|
||||
Each section has a [translatable name and description](#labels--descriptions), and it's also possible to specify an icon.
|
||||
|
||||
Grouping input fields by sections influences both how the inputs are displayed to the user and how user input is structured.
|
||||
In the example above, user input will be structured like this:
|
||||
|
||||
```python
|
||||
{
|
||||
@ -170,6 +173,22 @@ structured like this:
|
||||
|
||||
Only a single level of sections is allowed; it's not possible to have sections inside a section.
|
||||
|
||||
To specify an icon for a section, update `icons.json` according to this example:
|
||||
|
||||
```json
|
||||
{
|
||||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"sections": {
|
||||
"ssl_options": "mdi:lock"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Labels & descriptions
|
||||
|
||||
Translations for the form are added to `strings.json` in a key for the `step_id`. That object may contain the folowing keys:
|
||||
|
Loading…
x
Reference in New Issue
Block a user