mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +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:
|
||||
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(
|
||||
step_id="options_1",
|
||||
data_schema=vol.Schema(
|
||||
@ -79,15 +80,11 @@ class OptionsFlowHandler(OptionsFlow):
|
||||
{
|
||||
vol.Optional(
|
||||
CONF_BOOLEAN,
|
||||
default=self.config_entry.options.get(
|
||||
"section_1", {}
|
||||
).get(CONF_BOOLEAN, False),
|
||||
default=section_1.get(CONF_BOOLEAN, False),
|
||||
): bool,
|
||||
vol.Optional(
|
||||
CONF_INT,
|
||||
self.config_entry.options.get("section_1", {}).get(
|
||||
CONF_INT, 10
|
||||
),
|
||||
default=section_1.get(CONF_INT, 10),
|
||||
): int,
|
||||
}
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user