diff --git a/homeassistant/components/imap/config_flow.py b/homeassistant/components/imap/config_flow.py index b8215e8b709584..5bbb8599cf2925 100644 --- a/homeassistant/components/imap/config_flow.py +++ b/homeassistant/components/imap/config_flow.py @@ -15,7 +15,13 @@ ConfigFlowResult, OptionsFlowWithConfigEntry, ) -from homeassistant.const import CONF_PASSWORD, CONF_PORT, CONF_USERNAME, CONF_VERIFY_SSL +from homeassistant.const import ( + CONF_NAME, + CONF_PASSWORD, + CONF_PORT, + CONF_USERNAME, + CONF_VERIFY_SSL, +) from homeassistant.core import HomeAssistant, callback from homeassistant.data_entry_flow import AbortFlow from homeassistant.helpers import config_validation as cv @@ -190,7 +196,10 @@ async def async_step_reauth_confirm( return self.async_update_reload_and_abort(reauth_entry, data=user_input) return self.async_show_form( - description_placeholders={CONF_USERNAME: reauth_entry.data[CONF_USERNAME]}, + description_placeholders={ + CONF_USERNAME: reauth_entry.data[CONF_USERNAME], + CONF_NAME: reauth_entry.title, + }, step_id="reauth_confirm", data_schema=vol.Schema( { diff --git a/tests/components/imap/test_config_flow.py b/tests/components/imap/test_config_flow.py index fb97bf0505d5d3..2270030ad4ffde 100644 --- a/tests/components/imap/test_config_flow.py +++ b/tests/components/imap/test_config_flow.py @@ -15,7 +15,7 @@ DOMAIN, ) from homeassistant.components.imap.errors import InvalidAuth, InvalidFolder -from homeassistant.const import CONF_PASSWORD, CONF_USERNAME +from homeassistant.const import CONF_NAME, CONF_PASSWORD, CONF_USERNAME from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType @@ -218,7 +218,10 @@ async def test_reauth_success(hass: HomeAssistant, mock_setup_entry: AsyncMock) result = await entry.start_reauth_flow(hass) assert result["type"] is FlowResultType.FORM assert result["step_id"] == "reauth_confirm" - assert result["description_placeholders"] == {CONF_USERNAME: "email@email.com"} + assert result["description_placeholders"] == { + CONF_USERNAME: "email@email.com", + CONF_NAME: "Mock Title", + } with patch( "homeassistant.components.imap.config_flow.connect_to_server"