Sure Petcare deprecation issue yaml configuration (#97363)

Sure Petcare yaml config issue
This commit is contained in:
G Johansson 2023-07-27 22:53:51 +02:00 committed by GitHub
parent 4ac139592a
commit ae3cc0b619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,10 +18,15 @@ from homeassistant.const import (
CONF_USERNAME,
Platform,
)
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.core import (
DOMAIN as HOMEASSISTANT_DOMAIN,
HomeAssistant,
ServiceCall,
)
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from homeassistant.helpers.typing import ConfigType
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
@ -88,6 +93,20 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
data=config[DOMAIN],
)
)
async_create_issue(
hass,
HOMEASSISTANT_DOMAIN,
f"deprecated_yaml_{DOMAIN}",
breaks_in_ha_version="2024.2.0",
is_fixable=False,
issue_domain=DOMAIN,
severity=IssueSeverity.WARNING,
translation_key="deprecated_yaml",
translation_placeholders={
"domain": DOMAIN,
"integration_title": "Sure Petcare",
},
)
return True