mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Remove usage of options property in OptionsFlow (part 2) (#129897)
This commit is contained in:
parent
c54ed53a81
commit
1e42a38473
@ -284,8 +284,7 @@ class AxisOptionsFlowHandler(OptionsFlow):
|
|||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Manage the Axis device stream options."""
|
"""Manage the Axis device stream options."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
self.options.update(user_input)
|
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||||
return self.async_create_entry(title="", data=self.options)
|
|
||||||
|
|
||||||
schema = {}
|
schema = {}
|
||||||
|
|
||||||
|
@ -312,8 +312,7 @@ class DeconzOptionsFlowHandler(OptionsFlow):
|
|||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Manage the deconz devices options."""
|
"""Manage the deconz devices options."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
self.options.update(user_input)
|
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||||
return self.async_create_entry(title="", data=self.options)
|
|
||||||
|
|
||||||
schema_options = {}
|
schema_options = {}
|
||||||
for option, default in (
|
for option, default in (
|
||||||
|
@ -47,8 +47,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
async def async_step_init(self, user_input=None) -> ConfigFlowResult:
|
async def async_step_init(self, user_input=None) -> ConfigFlowResult:
|
||||||
"""Manage the options."""
|
"""Manage the options."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
self.options.update(user_input)
|
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||||
return self.async_create_entry(title="", data=self.options)
|
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="init",
|
step_id="init",
|
||||||
|
@ -68,8 +68,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Manage the options."""
|
"""Manage the options."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
self.options.update(user_input)
|
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||||
return await self._update_options()
|
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="options_1",
|
step_id="options_1",
|
||||||
@ -95,7 +94,3 @@ class OptionsFlowHandler(OptionsFlow):
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _update_options(self) -> ConfigFlowResult:
|
|
||||||
"""Update config entry options."""
|
|
||||||
return self.async_create_entry(title="", data=self.options)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user