mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 03:03:17 +01:00
56 lines
1.7 KiB
Python
56 lines
1.7 KiB
Python
"""Issues for Duck DNS integration."""
|
|
|
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant, callback
|
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
|
|
|
from .const import DOMAIN
|
|
|
|
|
|
@callback
|
|
def deprecate_yaml_issue(hass: HomeAssistant, *, import_success: bool) -> None:
|
|
"""Deprecate yaml issue."""
|
|
if import_success:
|
|
async_create_issue(
|
|
hass,
|
|
HOMEASSISTANT_DOMAIN,
|
|
f"deprecated_yaml_{DOMAIN}",
|
|
is_fixable=False,
|
|
issue_domain=DOMAIN,
|
|
breaks_in_ha_version="2026.6.0",
|
|
severity=IssueSeverity.WARNING,
|
|
translation_key="deprecated_yaml",
|
|
translation_placeholders={
|
|
"domain": DOMAIN,
|
|
"integration_title": "Duck DNS",
|
|
},
|
|
)
|
|
else:
|
|
async_create_issue(
|
|
hass,
|
|
DOMAIN,
|
|
"deprecated_yaml_import_issue_error",
|
|
breaks_in_ha_version="2026.6.0",
|
|
is_fixable=False,
|
|
issue_domain=DOMAIN,
|
|
severity=IssueSeverity.WARNING,
|
|
translation_key="deprecated_yaml_import_issue_error",
|
|
translation_placeholders={
|
|
"url": "/config/integrations/dashboard/add?domain=duckdns"
|
|
},
|
|
)
|
|
|
|
|
|
def action_called_without_config_entry(hass: HomeAssistant) -> None:
|
|
"""Deprecate the use of action without config entry."""
|
|
|
|
async_create_issue(
|
|
hass,
|
|
DOMAIN,
|
|
"deprecated_call_without_config_entry",
|
|
breaks_in_ha_version="2026.9.0",
|
|
is_fixable=False,
|
|
issue_domain=DOMAIN,
|
|
severity=IssueSeverity.WARNING,
|
|
translation_key="deprecated_call_without_config_entry",
|
|
)
|