Skip to content

Commit

Permalink
Sure Petcare deprecation issue yaml configuration (home-assistant#97363)
Browse files Browse the repository at this point in the history
Sure Petcare yaml config issue
  • Loading branch information
gjohansson-ST authored Jul 27, 2023
1 parent 4ac1395 commit ae3cc0b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion homeassistant/components/surepetcare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
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

Expand Down Expand Up @@ -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


Expand Down

0 comments on commit ae3cc0b

Please sign in to comment.