diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index dc332e9c20c..32014be7774 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -608,6 +608,7 @@ class ConfigEntry: flow_context = { "source": SOURCE_REAUTH, "entry_id": self.entry_id, + "title_placeholders": {"name": self.title}, "unique_id": self.unique_id, } diff --git a/tests/components/hyperion/test_light.py b/tests/components/hyperion/test_light.py index f91cc312ca6..0cb85aeb5e2 100644 --- a/tests/components/hyperion/test_light.py +++ b/tests/components/hyperion/test_light.py @@ -897,6 +897,7 @@ async def test_setup_entry_no_token_reauth(hass: HomeAssistant) -> None: CONF_SOURCE: SOURCE_REAUTH, "entry_id": config_entry.entry_id, "unique_id": config_entry.unique_id, + "title_placeholders": {"name": config_entry.title}, }, data=config_entry.data, ) @@ -925,6 +926,7 @@ async def test_setup_entry_bad_token_reauth(hass: HomeAssistant) -> None: CONF_SOURCE: SOURCE_REAUTH, "entry_id": config_entry.entry_id, "unique_id": config_entry.unique_id, + "title_placeholders": {"name": config_entry.title}, }, data=config_entry.data, ) diff --git a/tests/components/smarttub/test_init.py b/tests/components/smarttub/test_init.py index f316a66c5d1..32b15e06c8a 100644 --- a/tests/components/smarttub/test_init.py +++ b/tests/components/smarttub/test_init.py @@ -43,6 +43,7 @@ async def test_setup_auth_failed(setup_component, hass, config_entry, smarttub_a "source": SOURCE_REAUTH, "entry_id": config_entry.entry_id, "unique_id": config_entry.unique_id, + "title_placeholders": {"name": config_entry.title}, }, data=config_entry.data, ) diff --git a/tests/components/sonarr/test_init.py b/tests/components/sonarr/test_init.py index 6dfce4ee2fe..39d9b7fc24e 100644 --- a/tests/components/sonarr/test_init.py +++ b/tests/components/sonarr/test_init.py @@ -33,6 +33,7 @@ async def test_config_entry_reauth( CONF_SOURCE: SOURCE_REAUTH, "entry_id": entry.entry_id, "unique_id": entry.unique_id, + "title_placeholders": {"name": entry.title}, }, data=entry.data, ) diff --git a/tests/test_config_entries.py b/tests/test_config_entries.py index 01a22dc1edb..cad92a5d92d 100644 --- a/tests/test_config_entries.py +++ b/tests/test_config_entries.py @@ -2739,6 +2739,7 @@ async def test_setup_raise_auth_failed(hass, caplog): assert len(flows) == 1 assert flows[0]["context"]["entry_id"] == entry.entry_id assert flows[0]["context"]["source"] == config_entries.SOURCE_REAUTH + assert flows[0]["context"]["title_placeholders"] == {"name": "test_title"} caplog.clear() entry.state = config_entries.ConfigEntryState.NOT_LOADED