Deprecate YAML configuration of Habitica (#116374)
Add deprecation issue for yaml import
This commit is contained in:
parent
eec1dafe11
commit
3d750414f1
1 changed files with 16 additions and 1 deletions
|
@ -10,9 +10,10 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigFlow
|
from homeassistant.config_entries import ConfigFlow
|
||||||
from homeassistant.const import CONF_API_KEY, CONF_NAME, CONF_URL
|
from homeassistant.const import CONF_API_KEY, CONF_NAME, CONF_URL
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||||
|
|
||||||
from .const import CONF_API_USER, DEFAULT_URL, DOMAIN
|
from .const import CONF_API_USER, DEFAULT_URL, DOMAIN
|
||||||
|
|
||||||
|
@ -79,6 +80,20 @@ class HabiticaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
|
|
||||||
async def async_step_import(self, import_data):
|
async def async_step_import(self, import_data):
|
||||||
"""Import habitica config from configuration.yaml."""
|
"""Import habitica config from configuration.yaml."""
|
||||||
|
|
||||||
|
async_create_issue(
|
||||||
|
self.hass,
|
||||||
|
HOMEASSISTANT_DOMAIN,
|
||||||
|
f"deprecated_yaml_{DOMAIN}",
|
||||||
|
is_fixable=False,
|
||||||
|
breaks_in_ha_version="2024.11.0",
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_yaml",
|
||||||
|
translation_placeholders={
|
||||||
|
"domain": DOMAIN,
|
||||||
|
"integration_title": "Habitica",
|
||||||
|
},
|
||||||
|
)
|
||||||
return await self.async_step_user(import_data)
|
return await self.async_step_user(import_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue