mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Clean up double spotify persistent notification for re-auth (#77307)
This commit is contained in:
parent
0e10e6f4cd
commit
bda9cb59d2
@ -7,7 +7,6 @@ from typing import Any
|
|||||||
|
|
||||||
from spotipy import Spotify
|
from spotipy import Spotify
|
||||||
|
|
||||||
from homeassistant.components import persistent_notification
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.data_entry_flow import FlowResult
|
from homeassistant.data_entry_flow import FlowResult
|
||||||
from homeassistant.helpers import config_entry_oauth2_flow
|
from homeassistant.helpers import config_entry_oauth2_flow
|
||||||
@ -63,14 +62,6 @@ class SpotifyFlowHandler(
|
|||||||
self.context["entry_id"]
|
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()
|
return await self.async_step_reauth_confirm()
|
||||||
|
|
||||||
async def async_step_reauth_confirm(
|
async def async_step_reauth_confirm(
|
||||||
@ -87,7 +78,6 @@ class SpotifyFlowHandler(
|
|||||||
errors={},
|
errors={},
|
||||||
)
|
)
|
||||||
|
|
||||||
persistent_notification.async_dismiss(self.hass, "spotify_reauth")
|
|
||||||
return await self.async_step_pick_implementation(
|
return await self.async_step_pick_implementation(
|
||||||
user_input={"implementation": self.reauth_entry.data["auth_implementation"]}
|
user_input={"implementation": self.reauth_entry.data["auth_implementation"]}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user