diff --git a/.coveragerc b/.coveragerc index eeffb341fd8..74fde968370 100644 --- a/.coveragerc +++ b/.coveragerc @@ -182,7 +182,6 @@ omit = homeassistant/components/canary/camera.py homeassistant/components/cert_expiry/helper.py homeassistant/components/channels/* - homeassistant/components/circuit/* homeassistant/components/cisco_ios/device_tracker.py homeassistant/components/cisco_mobility_express/device_tracker.py homeassistant/components/cisco_webex_teams/notify.py diff --git a/CODEOWNERS b/CODEOWNERS index 71ac96c05e7..aaed793dd41 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -239,7 +239,6 @@ build.json @home-assistant/supervisor /tests/components/ccm15/ @ocalvo /homeassistant/components/cert_expiry/ @jjlawren /tests/components/cert_expiry/ @jjlawren -/homeassistant/components/circuit/ @braam /homeassistant/components/cisco_ios/ @fbradyirl /homeassistant/components/cisco_mobility_express/ @fbradyirl /homeassistant/components/cisco_webex_teams/ @fbradyirl diff --git a/homeassistant/components/circuit/__init__.py b/homeassistant/components/circuit/__init__.py deleted file mode 100644 index 7e7d0eda76e..00000000000 --- a/homeassistant/components/circuit/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -"""The Unify Circuit component.""" - -import voluptuous as vol - -from homeassistant.const import CONF_NAME, CONF_URL, Platform -from homeassistant.core import HomeAssistant -from homeassistant.helpers import config_validation as cv, discovery -import homeassistant.helpers.issue_registry as ir -from homeassistant.helpers.typing import ConfigType - -DOMAIN = "circuit" -CONF_WEBHOOK = "webhook" - -WEBHOOK_SCHEMA = vol.Schema( - {vol.Optional(CONF_NAME): cv.string, vol.Required(CONF_URL): cv.string} -) - -CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: vol.Schema( - {vol.Required(CONF_WEBHOOK): vol.All(cv.ensure_list, [WEBHOOK_SCHEMA])} - ) - }, - extra=vol.ALLOW_EXTRA, -) - - -async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: - """Set up the Unify Circuit component.""" - ir.async_create_issue( - hass, - DOMAIN, - "service_removal", - breaks_in_ha_version="2024.7.0", - is_fixable=False, - is_persistent=True, - severity=ir.IssueSeverity.WARNING, - translation_key="service_removal", - translation_placeholders={"integration": "Unify Circuit", "domain": DOMAIN}, - ) - webhooks = config[DOMAIN][CONF_WEBHOOK] - - for webhook_conf in webhooks: - hass.async_create_task( - discovery.async_load_platform( - hass, Platform.NOTIFY, DOMAIN, webhook_conf, config - ) - ) - - return True diff --git a/homeassistant/components/circuit/manifest.json b/homeassistant/components/circuit/manifest.json deleted file mode 100644 index d982aef31ec..00000000000 --- a/homeassistant/components/circuit/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "domain": "circuit", - "name": "Unify Circuit", - "codeowners": ["@braam"], - "documentation": "https://www.home-assistant.io/integrations/circuit", - "iot_class": "cloud_push", - "loggers": ["circuit_webhook"], - "requirements": ["circuit-webhook==1.0.1"] -} diff --git a/homeassistant/components/circuit/notify.py b/homeassistant/components/circuit/notify.py deleted file mode 100644 index 23884ebd9be..00000000000 --- a/homeassistant/components/circuit/notify.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Unify Circuit platform for notify component.""" - -from __future__ import annotations - -import logging - -from circuit_webhook import Circuit - -from homeassistant.components.notify import BaseNotificationService -from homeassistant.const import CONF_URL -from homeassistant.core import HomeAssistant -from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType - -_LOGGER = logging.getLogger(__name__) - - -def get_service( - hass: HomeAssistant, - config: ConfigType, - discovery_info: DiscoveryInfoType | None = None, -) -> CircuitNotificationService | None: - """Get the Unify Circuit notification service.""" - if discovery_info is None: - return None - - return CircuitNotificationService(discovery_info) - - -class CircuitNotificationService(BaseNotificationService): - """Implement the notification service for Unify Circuit.""" - - def __init__(self, config): - """Initialize the service.""" - self.webhook_url = config[CONF_URL] - - def send_message(self, message=None, **kwargs): - """Send a message to the webhook.""" - - webhook_url = self.webhook_url - - if webhook_url and message: - try: - circuit_message = Circuit(url=webhook_url) - circuit_message.post(text=message) - except RuntimeError as err: - _LOGGER.error("Could not send notification. Error: %s", err) diff --git a/homeassistant/components/circuit/strings.json b/homeassistant/components/circuit/strings.json deleted file mode 100644 index b9cb852d5b9..00000000000 --- a/homeassistant/components/circuit/strings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "issues": { - "service_removal": { - "title": "The {integration} integration is being removed", - "description": "The {integration} integration will be removed, as the service is no longer maintained.\n\n\n\nRemove the `{domain}` configuration from your configuration.yaml file and restart Home Assistant to fix this issue." - } - } -} diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index 425702562d0..43b1c1b45f7 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -885,12 +885,6 @@ "config_flow": false, "iot_class": "local_polling" }, - "circuit": { - "name": "Unify Circuit", - "integration_type": "hub", - "config_flow": false, - "iot_class": "cloud_push" - }, "cisco": { "name": "Cisco", "integrations": { diff --git a/requirements_all.txt b/requirements_all.txt index 25da9893ddc..f82ac823eb8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -648,9 +648,6 @@ cached_ipaddress==0.3.0 # homeassistant.components.caldav caldav==1.3.9 -# homeassistant.components.circuit -circuit-webhook==1.0.1 - # homeassistant.components.cisco_mobility_express ciscomobilityexpress==0.3.9