1
mirror of https://github.com/home-assistant/core synced 2024-09-03 08:14:07 +02:00

Drop unnecessary async definitions in onewire (#72018)

This commit is contained in:
epenet 2022-05-18 10:34:20 +02:00 committed by GitHub
parent 8d57f70466
commit 2851540453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ class OnewireOptionsFlowHandler(OptionsFlow):
if user_input.get(INPUT_ENTRY_CLEAR_OPTIONS):
# Reset all options
self.options = {}
return await self._update_options()
return self._async_update_options()
selected_devices: list[str] = (
user_input.get(INPUT_ENTRY_DEVICE_SELECTION) or []
@ -181,7 +181,7 @@ class OnewireOptionsFlowHandler(OptionsFlow):
self._update_device_options(user_input)
if self.devices_to_configure:
return await self.async_step_configure_device(user_input=None)
return await self._update_options()
return self._async_update_options()
self.current_device, description = self.devices_to_configure.popitem()
data_schema = vol.Schema(
@ -201,7 +201,8 @@ class OnewireOptionsFlowHandler(OptionsFlow):
description_placeholders={"sensor_id": self.current_device},
)
async def _update_options(self) -> FlowResult:
@callback
def _async_update_options(self) -> FlowResult:
"""Update config entry options."""
return self.async_create_entry(title="", data=self.options)