Skip to content

Commit 0ede15d

Browse files
authored
Use new reauth helpers in webostv (#128823)
1 parent 8ceecec commit 0ede15d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

homeassistant/components/webostv/config_flow.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def __init__(self) -> None:
4747
self._host: str = ""
4848
self._name: str = ""
4949
self._uuid: str | None = None
50-
self._entry: ConfigEntry | None = None
5150

5251
@staticmethod
5352
@callback
@@ -144,15 +143,12 @@ async def async_step_reauth(
144143
) -> ConfigFlowResult:
145144
"""Perform reauth upon an WebOsTvPairError."""
146145
self._host = entry_data[CONF_HOST]
147-
self._entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
148146
return await self.async_step_reauth_confirm()
149147

150148
async def async_step_reauth_confirm(
151149
self, user_input: dict[str, Any] | None = None
152150
) -> ConfigFlowResult:
153151
"""Dialog that informs the user that reauth is required."""
154-
assert self._entry is not None
155-
156152
if user_input is not None:
157153
try:
158154
client = await async_control_connect(self._host, None)
@@ -161,8 +157,9 @@ async def async_step_reauth_confirm(
161157
except WEBOSTV_EXCEPTIONS:
162158
return self.async_abort(reason="reauth_unsuccessful")
163159

164-
update_client_key(self.hass, self._entry, client)
165-
await self.hass.config_entries.async_reload(self._entry.entry_id)
160+
reauth_entry = self._get_reauth_entry()
161+
update_client_key(self.hass, reauth_entry, client)
162+
await self.hass.config_entries.async_reload(reauth_entry.entry_id)
166163
return self.async_abort(reason="reauth_successful")
167164

168165
return self.async_show_form(step_id="reauth_confirm")

0 commit comments

Comments
 (0)