diff --git a/homeassistant/components/season/sensor.py b/homeassistant/components/season/sensor.py index 5fc161062bb..8bb8773860d 100644 --- a/homeassistant/components/season/sensor.py +++ b/homeassistant/components/season/sensor.py @@ -17,6 +17,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.device_registry import DeviceEntryType from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback +from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.util.dt import utcnow @@ -62,6 +63,15 @@ async def async_setup_platform( discovery_info: DiscoveryInfoType | None = None, ) -> None: """Set up the season sensor platform.""" + async_create_issue( + hass, + DOMAIN, + "removed_yaml", + breaks_in_ha_version="2022.12.0", + is_fixable=False, + severity=IssueSeverity.WARNING, + translation_key="removed_yaml", + ) hass.async_create_task( hass.config_entries.flow.async_init( DOMAIN, diff --git a/homeassistant/components/season/strings.json b/homeassistant/components/season/strings.json index c75c0f1c507..25d121d16e6 100644 --- a/homeassistant/components/season/strings.json +++ b/homeassistant/components/season/strings.json @@ -10,5 +10,11 @@ "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_service%]" } + }, + "issues": { + "removed_yaml": { + "title": "The Season YAML configuration has been removed", + "description": "Configuring Season using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue." + } } } diff --git a/homeassistant/components/season/translations/en.json b/homeassistant/components/season/translations/en.json index 1638f3c0a20..5508c305fea 100644 --- a/homeassistant/components/season/translations/en.json +++ b/homeassistant/components/season/translations/en.json @@ -10,5 +10,11 @@ } } } + }, + "issues": { + "removed_yaml": { + "description": "Configuring Season using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.", + "title": "The Season YAML configuration has been removed" + } } } \ No newline at end of file