mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02:00
Fix fritzbox errors again (#34710)
This commit is contained in:
parent
8ff1fc6f8b
commit
8402363568
@ -42,8 +42,6 @@ class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Initialize flow."""
|
"""Initialize flow."""
|
||||||
self._host = None
|
self._host = None
|
||||||
self._manufacturer = None
|
|
||||||
self._model = None
|
|
||||||
self._name = None
|
self._name = None
|
||||||
self._password = None
|
self._password = None
|
||||||
self._username = None
|
self._username = None
|
||||||
@ -83,7 +81,7 @@ class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
|
|
||||||
for entry in self.hass.config_entries.async_entries(DOMAIN):
|
for entry in self.hass.config_entries.async_entries(DOMAIN):
|
||||||
if entry.data.get(CONF_HOST) == user_input[CONF_HOST]:
|
if entry.data[CONF_HOST] == user_input[CONF_HOST]:
|
||||||
if entry.data != user_input:
|
if entry.data != user_input:
|
||||||
self.hass.config_entries.async_update_entry(
|
self.hass.config_entries.async_update_entry(
|
||||||
entry, data=user_input
|
entry, data=user_input
|
||||||
@ -117,9 +115,7 @@ class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
return self.async_abort(reason="already_in_progress")
|
return self.async_abort(reason="already_in_progress")
|
||||||
|
|
||||||
for entry in self.hass.config_entries.async_entries(DOMAIN):
|
for entry in self.hass.config_entries.async_entries(DOMAIN):
|
||||||
if entry.data.get(CONF_HOST) == host:
|
if entry.data[CONF_HOST] == host:
|
||||||
if entry.data != user_input:
|
|
||||||
self.hass.config_entries.async_update_entry(entry, data=user_input)
|
|
||||||
return self.async_abort(reason="already_configured")
|
return self.async_abort(reason="already_configured")
|
||||||
|
|
||||||
self._host = host
|
self._host = host
|
||||||
|
Loading…
Reference in New Issue
Block a user