Fix Spotify reauth crash when config entry data lacks "id" (#182290)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Joost Lekkerkerker
2026-09-18 10:28:00 +00:00
committed by Franck Nijhof
co-authored by Claude
parent 258fb3e117
commit 100c365aa9
3 changed files with 2 additions and 2 deletions
@@ -75,7 +75,7 @@ class SpotifyFlowHandler(
if user_input is None:
return self.async_show_form(
step_id="reauth_confirm",
description_placeholders={"account": reauth_entry.data["id"]},
description_placeholders={"account": reauth_entry.title},
errors={},
)
-1
View File
@@ -60,7 +60,6 @@ def mock_config_entry(expires_at: int) -> MockConfigEntry:
"expires_at": expires_at,
"scope": SCOPES,
},
"id": "1112264111",
"name": "spotify_account_1",
},
entry_id="01J5TX5A0FF6G5V0QJX6HBC94T",
@@ -204,6 +204,7 @@ async def test_reauthentication(
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"
assert result["description_placeholders"]["account"] == "spotify_1"
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})