1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Ensure suggested values are added to section schema in data entry fow (#141227)

This commit is contained in:
Jan Bouwhuis
2025-03-23 22:14:06 +01:00
committed by GitHub
parent 842356877e
commit 93010ab5c9
3 changed files with 45 additions and 22 deletions

View File

@@ -657,6 +657,19 @@ class FlowHandler(Generic[_FlowContextT, _FlowResultT, _HandlerT]):
):
continue
# Process the section schema options
if (
suggested_values is not None
and isinstance(val, section)
and key in suggested_values
):
new_section_key = copy.copy(key)
schema[new_section_key] = val
val.schema = self.add_suggested_values_to_schema(
copy.deepcopy(val.schema), suggested_values[key]
)
continue
new_key = key
if (
suggested_values