Deprecate U.S. Citizenship and Immigration Services (USCIS) integration (#75562)

This commit is contained in:
Franck Nijhof 2022-07-21 13:56:55 +02:00 committed by GitHub
parent b1ed1543c8
commit 8523c66bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View File

@ -3,6 +3,7 @@
"name": "U.S. Citizenship and Immigration Services (USCIS)",
"documentation": "https://www.home-assistant.io/integrations/uscis",
"requirements": ["uscisstatus==0.1.1"],
"dependencies": ["repairs"],
"codeowners": [],
"iot_class": "cloud_polling",
"loggers": ["uscisstatus"]

View File

@ -7,6 +7,7 @@ import logging
import uscisstatus
import voluptuous as vol
from homeassistant.components.repairs import IssueSeverity, create_issue
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant
@ -34,6 +35,18 @@ def setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the platform in Home Assistant and Case Information."""
create_issue(
hass,
"uscis",
"pending_removal",
breaks_in_ha_version="2022.10.0",
is_fixable=False,
severity=IssueSeverity.WARNING,
translation_key="pending_removal",
)
_LOGGER.warning(
"The USCIS sensor component is deprecated and will be removed in Home Assistant 2022.10"
)
uscis = UscisSensor(config["case_id"], config[CONF_NAME])
uscis.update()
if uscis.valid_case_id:

View File

@ -0,0 +1,8 @@
{
"issues": {
"pending_removal": {
"title": "The USCIS integration is being removed",
"description": "The U.S. Citizenship and Immigration Services (USCIS) integration is pending removal from Home Assistant and will no longer be available as of Home Assistant 2022.10.\n\nThe integration is being removed, because it relies on webscraping, which is not allowed.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
}
}

View File

@ -0,0 +1,8 @@
{
"issues": {
"pending_removal": {
"description": "The U.S. Citizenship and Immigration Services (USCIS) integration is pending removal from Home Assistant and will no longer be available as of Home Assistant 2022.10.\n\nThe integration is being removed, because it relies on webscraping, which is not allowed.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
"title": "The USCIS integration is being removed"
}
}
}