Skip to content

Commit

Permalink
Fix reauth flow for Comelit VEDO (#107461)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelli74 authored and frenck committed Jan 12, 2024
1 parent b333be8 commit 8682201
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/comelit/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ComelitConfigFlow(ConfigFlow, domain=DOMAIN):
_reauth_entry: ConfigEntry | None
_reauth_host: str
_reauth_port: int
_reauth_type: str

async def async_step_user(
self, user_input: dict[str, Any] | None = None
Expand Down Expand Up @@ -109,6 +110,7 @@ async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult:
)
self._reauth_host = entry_data[CONF_HOST]
self._reauth_port = entry_data.get(CONF_PORT, DEFAULT_PORT)
self._reauth_type = entry_data.get(CONF_TYPE, BRIDGE)

self.context["title_placeholders"] = {"host": self._reauth_host}
return await self.async_step_reauth_confirm()
Expand All @@ -127,6 +129,7 @@ async def async_step_reauth_confirm(
{
CONF_HOST: self._reauth_host,
CONF_PORT: self._reauth_port,
CONF_TYPE: self._reauth_type,
}
| user_input,
)
Expand All @@ -144,6 +147,7 @@ async def async_step_reauth_confirm(
CONF_HOST: self._reauth_host,
CONF_PORT: self._reauth_port,
CONF_PIN: user_input[CONF_PIN],
CONF_TYPE: self._reauth_type,
},
)
self.hass.async_create_task(
Expand Down

0 comments on commit 8682201

Please sign in to comment.