Fix zodiac import flow/issue (#97282)

This commit is contained in:
Franck Nijhof 2023-07-26 21:22:22 +02:00 committed by GitHub
parent 9b7dcce7ed
commit fd3c2c2811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,27 +17,27 @@ CONFIG_SCHEMA = vol.Schema(
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the zodiac component.""" """Set up the zodiac component."""
if DOMAIN in config:
async_create_issue( async_create_issue(
hass, hass,
HOMEASSISTANT_DOMAIN, HOMEASSISTANT_DOMAIN,
f"deprecated_yaml_{DOMAIN}", f"deprecated_yaml_{DOMAIN}",
breaks_in_ha_version="2024.1.0", breaks_in_ha_version="2024.1.0",
is_fixable=False, is_fixable=False,
issue_domain=DOMAIN, issue_domain=DOMAIN,
severity=IssueSeverity.WARNING, severity=IssueSeverity.WARNING,
translation_key="deprecated_yaml", translation_key="deprecated_yaml",
translation_placeholders={ translation_placeholders={
"domain": DOMAIN, "domain": DOMAIN,
"integration_title": "Zodiac", "integration_title": "Zodiac",
}, },
) )
hass.async_create_task( hass.async_create_task(
hass.config_entries.flow.async_init( hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=config DOMAIN, context={"source": SOURCE_IMPORT}, data=config
)
) )
)
return True return True