From deab6a3ecd94a1d480daddef9b756e543159a810 Mon Sep 17 00:00:00 2001 From: dummylabs Date: Sun, 17 Nov 2024 17:15:53 +0300 Subject: [PATCH] Fix data_entry_flow.section usage example There is an error in the "Show form" section of this document with the collapsible sections example. It makes it impossible to use suggested_values in ConfigFlow/OptionsFlow fields. Related ticket: https://github.com/home-assistant/frontend/issues/22419 --- docs/data_entry_flow_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/data_entry_flow_index.md b/docs/data_entry_flow_index.md index 554e915a126..5b195524cd0 100644 --- a/docs/data_entry_flow_index.md +++ b/docs/data_entry_flow_index.md @@ -119,7 +119,7 @@ For a more detailed explanation of `strings.json` see the [backend tra This result type will show a form to the user to fill in. You define the current step, the schema of the data (using a mixture of voluptuous and/or [selectors](https://www.home-assistant.io/docs/blueprint/selectors/)) and optionally a dictionary of errors. ```python -from homeassistant.data_entry_flow import section +from homeassistant import data_entry_flow from homeassistant.helpers.selector import selector class ExampleConfigFlow(data_entry_flow.FlowHandler): @@ -129,7 +129,7 @@ class ExampleConfigFlow(data_entry_flow.FlowHandler): vol.Required("username"): str, vol.Required("password"): str, # Items can be grouped by collapsible sections - "ssl_options": section( + vol.Required("ssl_options"): data_entry_flow.section( vol.Schema( { vol.Required("ssl", default=True): bool,