From 78003886a5614c64260782da53a4726a9c659a80 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sat, 29 Jul 2023 02:22:54 +0200 Subject: [PATCH] GDACS add yaml config issue (#97424) gdacs remove yaml issue --- homeassistant/components/gdacs/__init__.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/gdacs/__init__.py b/homeassistant/components/gdacs/__init__.py index 9474e006dbb..f25341455bb 100644 --- a/homeassistant/components/gdacs/__init__.py +++ b/homeassistant/components/gdacs/__init__.py @@ -13,10 +13,11 @@ from homeassistant.const import ( CONF_SCAN_INTERVAL, UnitOfLength, ) -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant, callback from homeassistant.helpers import aiohttp_client, config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.event import async_track_time_interval +from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.typing import ConfigType from homeassistant.util.unit_conversion import DistanceConverter from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM @@ -77,6 +78,20 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: }, ) ) + 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": "Global Disaster Alert and Coordination System", + }, + ) return True