From e93d47c363740d1bc891a9def6a617feba698ff7 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 27 Aug 2024 17:20:18 +0200 Subject: [PATCH] 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> --- docs/data_entry_flow_index.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/data_entry_flow_index.md b/docs/data_entry_flow_index.md index e4039dc3..554e915a 100644 --- a/docs/data_entry_flow_index.md +++ b/docs/data_entry_flow_index.md @@ -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: