Fix Withings reauth title (#126838)

pull/126854/head
Joost Lekkerkerker 2024-09-26 20:19:40 +02:00 committed by GitHub
parent e72ec07683
commit 185d00c86c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -10,7 +10,7 @@ from aiowithings import AuthScope
from homeassistant.components.webhook import async_generate_id
from homeassistant.config_entries import ConfigEntry, ConfigFlowResult
from homeassistant.const import CONF_TOKEN, CONF_WEBHOOK_ID
from homeassistant.const import CONF_NAME, CONF_TOKEN, CONF_WEBHOOK_ID
from homeassistant.helpers import config_entry_oauth2_flow
from .const import DEFAULT_TITLE, DOMAIN
@ -52,7 +52,11 @@ class WithingsFlowHandler(
) -> ConfigFlowResult:
"""Confirm reauth dialog."""
if user_input is None:
return self.async_show_form(step_id="reauth_confirm")
assert self.reauth_entry
return self.async_show_form(
step_id="reauth_confirm",
description_placeholders={CONF_NAME: self.reauth_entry.title},
)
return await self.async_step_user()
async def async_oauth_create_entry(self, data: dict[str, Any]) -> ConfigFlowResult: