Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed manual setting of self.config_entry #447

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading