Clean up double spotify persistent notification for re-auth (#77307)

This commit is contained in:
Martin Hjelmare
2022-08-26 00:20:29 +02:00
committed by GitHub
parent 0e10e6f4cd
commit bda9cb59d2
@@ -7,7 +7,6 @@ from typing import Any
from spotipy import Spotify
from homeassistant.components import persistent_notification
from homeassistant.config_entries import ConfigEntry
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import config_entry_oauth2_flow
@@ -63,14 +62,6 @@ class SpotifyFlowHandler(
self.context["entry_id"]
)
persistent_notification.async_create(
self.hass,
f"Spotify integration for account {entry_data['id']} needs to be "
"re-authenticated. Please go to the integrations page to re-configure it.",
"Spotify re-authentication",
"spotify_reauth",
)
return await self.async_step_reauth_confirm()
async def async_step_reauth_confirm(
@@ -87,7 +78,6 @@ class SpotifyFlowHandler(
errors={},
)
persistent_notification.async_dismiss(self.hass, "spotify_reauth")
return await self.async_step_pick_implementation(
user_input={"implementation": self.reauth_entry.data["auth_implementation"]}
)