mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix defaults
This commit is contained in:
parent
1a2c59ffeb
commit
48f44ab883
@ -70,6 +70,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
return self.async_create_entry(data=self.config_entry.options | user_input)
|
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||||
|
|
||||||
|
section_1 = self.config_entry.options.get("section_1", {})
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="options_1",
|
step_id="options_1",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
@ -79,15 +80,11 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
{
|
{
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
CONF_BOOLEAN,
|
CONF_BOOLEAN,
|
||||||
default=self.config_entry.options.get(
|
default=section_1.get(CONF_BOOLEAN, False),
|
||||||
"section_1", {}
|
|
||||||
).get(CONF_BOOLEAN, False),
|
|
||||||
): bool,
|
): bool,
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
CONF_INT,
|
CONF_INT,
|
||||||
self.config_entry.options.get("section_1", {}).get(
|
default=section_1.get(CONF_INT, 10),
|
||||||
CONF_INT, 10
|
|
||||||
),
|
|
||||||
): int,
|
): int,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user