Remove usage of options property in OptionsFlow (part 2) (#129897)
parent
c54ed53a81
commit
1e42a38473
|
@ -284,8 +284,7 @@ class AxisOptionsFlowHandler(OptionsFlow):
|
|||
) -> ConfigFlowResult:
|
||||
"""Manage the Axis device stream options."""
|
||||
if user_input is not None:
|
||||
self.options.update(user_input)
|
||||
return self.async_create_entry(title="", data=self.options)
|
||||
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||
|
||||
schema = {}
|
||||
|
||||
|
|
|
@ -312,8 +312,7 @@ class DeconzOptionsFlowHandler(OptionsFlow):
|
|||
) -> ConfigFlowResult:
|
||||
"""Manage the deconz devices options."""
|
||||
if user_input is not None:
|
||||
self.options.update(user_input)
|
||||
return self.async_create_entry(title="", data=self.options)
|
||||
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||
|
||||
schema_options = {}
|
||||
for option, default in (
|
||||
|
|
|
@ -47,8 +47,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||
async def async_step_init(self, user_input=None) -> ConfigFlowResult:
|
||||
"""Manage the options."""
|
||||
if user_input is not None:
|
||||
self.options.update(user_input)
|
||||
return self.async_create_entry(title="", data=self.options)
|
||||
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="init",
|
||||
|
|
|
@ -68,8 +68,7 @@ class OptionsFlowHandler(OptionsFlow):
|
|||
) -> ConfigFlowResult:
|
||||
"""Manage the options."""
|
||||
if user_input is not None:
|
||||
self.options.update(user_input)
|
||||
return await self._update_options()
|
||||
return self.async_create_entry(data=self.config_entry.options | user_input)
|
||||
|
||||
return self.async_show_form(
|
||||
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…
Reference in New Issue