Skip to content

Commit

Permalink
Removed manual setting of self.config_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
srkoster committed Jan 23, 2025
1 parent b097dba commit 102b869
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions custom_components/dahua/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 102b869

Please sign in to comment.