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:
Erik Montnemery 2024-08-27 17:20:18 +02:00 committed by GitHub
parent a4fff7c05d
commit e93d47c363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: