GDACS add yaml config issue (#97424)

gdacs remove yaml issue
pull/97443/head
G Johansson 2023-07-29 02:22:54 +02:00 committed by GitHub
parent 0a56361ca4
commit 78003886a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -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