diff --git a/.coveragerc b/.coveragerc index 6339e09a034..b5427435636 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1065,7 +1065,6 @@ omit = homeassistant/components/xbox/sensor.py homeassistant/components/xbox_live/sensor.py homeassistant/components/xeoma/camera.py - homeassistant/components/xfinity/device_tracker.py homeassistant/components/xiaomi/camera.py homeassistant/components/xiaomi_aqara/__init__.py homeassistant/components/xiaomi_aqara/binary_sensor.py diff --git a/CODEOWNERS b/CODEOWNERS index 0e33076105f..3d7ff5f79a5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -525,7 +525,6 @@ homeassistant/components/workday/* @fabaff homeassistant/components/worldclock/* @fabaff homeassistant/components/xbox/* @hunterjm homeassistant/components/xbox_live/* @MartinHjelmare -homeassistant/components/xfinity/* @cisasteelersfan homeassistant/components/xiaomi_aqara/* @danielhiversen @syssi homeassistant/components/xiaomi_miio/* @rytilahti @syssi @starkillerOG homeassistant/components/xiaomi_tv/* @simse diff --git a/homeassistant/components/xfinity/__init__.py b/homeassistant/components/xfinity/__init__.py deleted file mode 100644 index 22e37eccde9..00000000000 --- a/homeassistant/components/xfinity/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""The xfinity component.""" diff --git a/homeassistant/components/xfinity/device_tracker.py b/homeassistant/components/xfinity/device_tracker.py deleted file mode 100644 index 832c8bb1d5d..00000000000 --- a/homeassistant/components/xfinity/device_tracker.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Support for device tracking via Xfinity Gateways.""" -import logging - -from requests.exceptions import RequestException -import voluptuous as vol -from xfinity_gateway import XfinityGateway - -from homeassistant.components.device_tracker import ( - DOMAIN, - PLATFORM_SCHEMA, - DeviceScanner, -) -from homeassistant.const import CONF_HOST -import homeassistant.helpers.config_validation as cv - -_LOGGER = logging.getLogger(__name__) - -DEFAULT_HOST = "10.0.0.1" - -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( - {vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string} -) - - -def get_scanner(hass, config): - """Validate the configuration and return an Xfinity Gateway scanner.""" - _LOGGER.warning( - "The Xfinity Gateway has been deprecated and will be removed from " - "Home Assistant in version 0.109. Please remove it from your " - "configuration. " - ) - - gateway = XfinityGateway(config[DOMAIN][CONF_HOST]) - scanner = None - try: - gateway.scan_devices() - scanner = XfinityDeviceScanner(gateway) - except (RequestException, ValueError): - _LOGGER.error( - "Error communicating with Xfinity Gateway. Check host: %s", gateway.host - ) - - return scanner - - -class XfinityDeviceScanner(DeviceScanner): - """This class queries an Xfinity Gateway.""" - - def __init__(self, gateway): - """Initialize the scanner.""" - self.gateway = gateway - - def scan_devices(self): - """Scan for new devices and return a list of found MACs.""" - connected_devices = [] - try: - connected_devices = self.gateway.scan_devices() - except (RequestException, ValueError): - _LOGGER.error("Unable to scan devices. Check connection to gateway") - return connected_devices - - def get_device_name(self, device): - """Return the name of the given device or None if we don't know.""" - return self.gateway.get_device_name(device) diff --git a/homeassistant/components/xfinity/manifest.json b/homeassistant/components/xfinity/manifest.json deleted file mode 100644 index 999b77dfb59..00000000000 --- a/homeassistant/components/xfinity/manifest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "domain": "xfinity", - "name": "Xfinity Gateway", - "documentation": "https://www.home-assistant.io/integrations/xfinity", - "requirements": ["xfinity-gateway==0.0.4"], - "codeowners": ["@cisasteelersfan"] -} diff --git a/requirements_all.txt b/requirements_all.txt index 9e7a75e8905..dbad80603d4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2313,9 +2313,6 @@ xbox-webapi==2.0.8 # homeassistant.components.xbox_live xboxapi==2.0.1 -# homeassistant.components.xfinity -xfinity-gateway==0.0.4 - # homeassistant.components.knx xknx==0.16.3