Neato add yaml config removal issue (#97447)

This commit is contained in:
G Johansson 2023-08-07 13:14:33 +02:00 committed by GitHub
parent cf4287cd0c
commit 301eaa30b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,9 +12,10 @@ from homeassistant.components.application_credentials import (
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_TOKEN, Platform from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_TOKEN, Platform
from homeassistant.core import HomeAssistant from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import config_entry_oauth2_flow, config_validation as cv from homeassistant.helpers import config_entry_oauth2_flow, config_validation as cv
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
from . import api from . import api
@ -65,6 +66,20 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"automatically and can be safely removed from your " "automatically and can be safely removed from your "
"configuration.yaml file" "configuration.yaml file"
) )
async_create_issue(
hass,
HOMEASSISTANT_DOMAIN,
f"deprecated_yaml_{NEATO_DOMAIN}",
breaks_in_ha_version="2024.2.0",
is_fixable=False,
issue_domain=NEATO_DOMAIN,
severity=IssueSeverity.WARNING,
translation_key="deprecated_yaml",
translation_placeholders={
"domain": NEATO_DOMAIN,
"integration_title": "Neato Botvac",
},
)
return True return True