mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Remove sonarr reauth persistent notification (#41911)
This commit is contained in:
parent
c10fe4f723
commit
cbdd712b3d
@ -6,7 +6,6 @@ from typing import Any, Dict
|
|||||||
|
|
||||||
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
|
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
|
||||||
|
|
||||||
from homeassistant.components import persistent_notification
|
|
||||||
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry
|
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_NAME,
|
ATTR_NAME,
|
||||||
@ -123,13 +122,6 @@ def _async_start_reauth(hass: HomeAssistantType, entry: ConfigEntry):
|
|||||||
)
|
)
|
||||||
_LOGGER.error("API Key is no longer valid. Please reauthenticate")
|
_LOGGER.error("API Key is no longer valid. Please reauthenticate")
|
||||||
|
|
||||||
persistent_notification.async_create(
|
|
||||||
hass,
|
|
||||||
f"Sonarr integration for the Sonarr API hosted at {entry.entry_data[CONF_HOST]} needs to be re-authenticated. Please go to the integrations page to re-configure it.",
|
|
||||||
"Sonarr re-authentication",
|
|
||||||
"sonarr_reauth",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
async def _async_update_listener(hass: HomeAssistantType, entry: ConfigEntry) -> None:
|
async def _async_update_listener(hass: HomeAssistantType, entry: ConfigEntry) -> None:
|
||||||
"""Handle options update."""
|
"""Handle options update."""
|
||||||
|
@ -5,7 +5,6 @@ from typing import Any, Dict, Optional
|
|||||||
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
|
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import persistent_notification
|
|
||||||
from homeassistant.config_entries import CONN_CLASS_LOCAL_POLL, ConfigFlow, OptionsFlow
|
from homeassistant.config_entries import CONN_CLASS_LOCAL_POLL, ConfigFlow, OptionsFlow
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_API_KEY,
|
CONF_API_KEY,
|
||||||
@ -102,9 +101,6 @@ class SonarrConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
errors={},
|
errors={},
|
||||||
)
|
)
|
||||||
|
|
||||||
assert self.hass
|
|
||||||
persistent_notification.async_dismiss(self.hass, "sonarr_reauth")
|
|
||||||
|
|
||||||
return await self.async_step_user()
|
return await self.async_step_user()
|
||||||
|
|
||||||
async def async_step_user(
|
async def async_step_user(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user