From 102b869a50415ec9862f08b4e1209e73b671a624 Mon Sep 17 00:00:00 2001 From: Stefan Koster Date: Thu, 23 Jan 2025 10:08:34 +0100 Subject: [PATCH] Removed manual setting of self.config_entry --- custom_components/dahua/config_flow.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/custom_components/dahua/config_flow.py b/custom_components/dahua/config_flow.py index 1fe1837..035d914 100755 --- a/custom_components/dahua/config_flow.py +++ b/custom_components/dahua/config_flow.py @@ -148,7 +148,7 @@ async def async_step_name(self, user_input=None): @staticmethod @callback def async_get_options_flow(config_entry): - return DahuaOptionsFlowHandler(config_entry) + return DahuaOptionsFlowHandler() async def _show_config_form_user(self, user_input): # pylint: disable=unused-argument """Show the configuration form to edit camera name.""" @@ -200,13 +200,9 @@ async def _test_credentials(self, username, password, address, port, rtsp_port, class DahuaOptionsFlowHandler(config_entries.OptionsFlow): """Dahua config flow options handler.""" - def __init__(self, config_entry): - """Initialize HACS options flow.""" - self.config_entry = config_entry - self.options = dict(config_entry.options) - async def async_step_init(self, user_input=None): # pylint: disable=unused-argument """Manage the options.""" + self.options = dict(self.config_entry.options) return await self.async_step_user() async def async_step_user(self, user_input=None):