mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Use _get_reauth_entry in comelit config flow (#127386)
This commit is contained in:
parent
04860ae1d2
commit
609d410e6a
@ -68,7 +68,7 @@ class ComelitConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
"""Handle a config flow for Comelit."""
|
"""Handle a config flow for Comelit."""
|
||||||
|
|
||||||
VERSION = 1
|
VERSION = 1
|
||||||
_reauth_entry: ConfigEntry | None
|
_reauth_entry: ConfigEntry
|
||||||
_reauth_host: str
|
_reauth_host: str
|
||||||
_reauth_port: int
|
_reauth_port: int
|
||||||
_reauth_type: str
|
_reauth_type: str
|
||||||
@ -106,9 +106,7 @@ class ComelitConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
self, entry_data: Mapping[str, Any]
|
self, entry_data: Mapping[str, Any]
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle reauth flow."""
|
"""Handle reauth flow."""
|
||||||
self._reauth_entry = self.hass.config_entries.async_get_entry(
|
self._reauth_entry = self._get_reauth_entry()
|
||||||
self.context["entry_id"]
|
|
||||||
)
|
|
||||||
self._reauth_host = entry_data[CONF_HOST]
|
self._reauth_host = entry_data[CONF_HOST]
|
||||||
self._reauth_port = entry_data.get(CONF_PORT, DEFAULT_PORT)
|
self._reauth_port = entry_data.get(CONF_PORT, DEFAULT_PORT)
|
||||||
self._reauth_type = entry_data.get(CONF_TYPE, BRIDGE)
|
self._reauth_type = entry_data.get(CONF_TYPE, BRIDGE)
|
||||||
@ -120,7 +118,6 @@ class ComelitConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle reauth confirm."""
|
"""Handle reauth confirm."""
|
||||||
assert self._reauth_entry
|
|
||||||
errors = {}
|
errors = {}
|
||||||
|
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user