diff --git a/homeassistant/components/magicseaweed/sensor.py b/homeassistant/components/magicseaweed/sensor.py index 0fb2df6aaca..3c3eb939181 100644 --- a/homeassistant/components/magicseaweed/sensor.py +++ b/homeassistant/components/magicseaweed/sensor.py @@ -16,6 +16,7 @@ from homeassistant.const import CONF_API_KEY, CONF_MONITORED_CONDITIONS, CONF_NA from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback +from homeassistant.helpers.issue_registry import IssueSeverity, create_issue from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.util import Throttle import homeassistant.util.dt as dt_util @@ -80,6 +81,20 @@ def setup_platform( discovery_info: DiscoveryInfoType | None = None, ) -> None: """Set up the Magicseaweed sensor.""" + create_issue( + hass, + "magicseaweed", + "pending_removal", + breaks_in_ha_version="2023.3.0", + is_fixable=False, + severity=IssueSeverity.WARNING, + translation_key="pending_removal", + ) + _LOGGER.warning( + "The Magicseaweed integration is deprecated" + " and will be removed in Home Assistant 2023.3" + ) + name = config.get(CONF_NAME) spot_id = config[CONF_SPOT_ID] api_key = config[CONF_API_KEY] diff --git a/homeassistant/components/magicseaweed/strings.json b/homeassistant/components/magicseaweed/strings.json new file mode 100644 index 00000000000..0aa8a584190 --- /dev/null +++ b/homeassistant/components/magicseaweed/strings.json @@ -0,0 +1,8 @@ +{ + "issues": { + "pending_removal": { + "title": "The Magicseaweed integration is being removed", + "description": "The Magicseaweed integration is pending removal from Home Assistant and will no longer be available as of Home Assistant 2023.3.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue." + } + } +} diff --git a/homeassistant/components/magicseaweed/translations/en.json b/homeassistant/components/magicseaweed/translations/en.json new file mode 100644 index 00000000000..20d3c401e5d --- /dev/null +++ b/homeassistant/components/magicseaweed/translations/en.json @@ -0,0 +1,8 @@ +{ + "issues": { + "pending_removal": { + "description": "The Magicseaweed integration is pending removal from Home Assistant and will no longer be available as of Home Assistant 2023.3.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.", + "title": "The Magicseaweed integration is being removed" + } + } +} \ No newline at end of file