mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Deprecate U.S. Citizenship and Immigration Services (USCIS) integration (#75562)
This commit is contained in:
parent
b1ed1543c8
commit
8523c66bb5
@ -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"]
|
||||
|
@ -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:
|
||||
|
8
homeassistant/components/uscis/strings.json
Normal file
8
homeassistant/components/uscis/strings.json
Normal 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."
|
||||
}
|
||||
}
|
||||
}
|
8
homeassistant/components/uscis/translations/en.json
Normal file
8
homeassistant/components/uscis/translations/en.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user