From 57a441aa4af7326c88b08449ff94bc7543adf497 Mon Sep 17 00:00:00 2001 From: Manu Date: Sat, 27 Jun 2026 03:23:07 +0200 Subject: [PATCH] Remove ATEN Rack PDU integration (#174940) --- CODEOWNERS | 1 - homeassistant/components/aten_pe/__init__.py | 1 - .../components/aten_pe/manifest.json | 9 -- homeassistant/components/aten_pe/switch.py | 119 ------------------ homeassistant/generated/integrations.json | 6 - requirements_all.txt | 3 - script/hassfest/quality_scale.py | 2 - 7 files changed, 141 deletions(-) delete mode 100644 homeassistant/components/aten_pe/__init__.py delete mode 100644 homeassistant/components/aten_pe/manifest.json delete mode 100644 homeassistant/components/aten_pe/switch.py diff --git a/CODEOWNERS b/CODEOWNERS index f3ff567c43f7..bc1d6185b6e5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -181,7 +181,6 @@ CLAUDE.md @home-assistant/core /tests/components/asuswrt/ @kennedyshead @ollo69 @Vaskivskyi /homeassistant/components/atag/ @MatsNL /tests/components/atag/ @MatsNL -/homeassistant/components/aten_pe/ @mtdcr /homeassistant/components/atome/ @baqs /homeassistant/components/august/ @bdraco /tests/components/august/ @bdraco diff --git a/homeassistant/components/aten_pe/__init__.py b/homeassistant/components/aten_pe/__init__.py deleted file mode 100644 index 2a0fb277a48c..000000000000 --- a/homeassistant/components/aten_pe/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""The ATEN PE component.""" diff --git a/homeassistant/components/aten_pe/manifest.json b/homeassistant/components/aten_pe/manifest.json deleted file mode 100644 index 400ae1ada565..000000000000 --- a/homeassistant/components/aten_pe/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "domain": "aten_pe", - "name": "ATEN Rack PDU", - "codeowners": ["@mtdcr"], - "documentation": "https://www.home-assistant.io/integrations/aten_pe", - "iot_class": "local_polling", - "quality_scale": "legacy", - "requirements": ["atenpdu==0.3.6"] -} diff --git a/homeassistant/components/aten_pe/switch.py b/homeassistant/components/aten_pe/switch.py deleted file mode 100644 index acbc1926fcf0..000000000000 --- a/homeassistant/components/aten_pe/switch.py +++ /dev/null @@ -1,119 +0,0 @@ -"""The ATEN PE switch component.""" - -import logging -from typing import Any, override - -from atenpdu import AtenPE, AtenPEError -import voluptuous as vol - -from homeassistant.components.switch import ( - PLATFORM_SCHEMA as SWITCH_PLATFORM_SCHEMA, - SwitchDeviceClass, - SwitchEntity, -) -from homeassistant.const import CONF_HOST, CONF_PORT, CONF_USERNAME -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import PlatformNotReady -from homeassistant.helpers import config_validation as cv -from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo -from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType - -_LOGGER = logging.getLogger(__name__) - -CONF_AUTH_KEY = "auth_key" -CONF_COMMUNITY = "community" -CONF_PRIV_KEY = "priv_key" -DEFAULT_COMMUNITY = "private" -DEFAULT_PORT = "161" -DEFAULT_USERNAME = "administrator" - -PLATFORM_SCHEMA = SWITCH_PLATFORM_SCHEMA.extend( - { - vol.Required(CONF_HOST): cv.string, - vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port, - vol.Optional(CONF_COMMUNITY, default=DEFAULT_COMMUNITY): cv.string, - vol.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string, - vol.Optional(CONF_AUTH_KEY): cv.string, - vol.Optional(CONF_PRIV_KEY): cv.string, - } -) - - -async def async_setup_platform( - hass: HomeAssistant, - config: ConfigType, - async_add_entities: AddEntitiesCallback, - discovery_info: DiscoveryInfoType | None = None, -) -> None: - """Set up the ATEN PE switch.""" - node = config[CONF_HOST] - serv = config[CONF_PORT] - - dev = AtenPE( - node=node, - serv=serv, - community=config[CONF_COMMUNITY], - username=config[CONF_USERNAME], - authkey=config.get(CONF_AUTH_KEY), - privkey=config.get(CONF_PRIV_KEY), - ) - - try: - await hass.async_add_executor_job(dev.initialize) - mac = await dev.deviceMAC() - outlets = dev.outlets() - name = await dev.deviceName() - model = await dev.modelName() - sw_version = await dev.deviceFWversion() - except AtenPEError as exc: - _LOGGER.error("Failed to initialize %s:%s: %s", node, serv, str(exc)) - raise PlatformNotReady from exc - - info = DeviceInfo( - connections={(CONNECTION_NETWORK_MAC, mac)}, - manufacturer="ATEN", - model=model, - name=name, - sw_version=sw_version, - ) - - async_add_entities( - (AtenSwitch(dev, info, mac, outlet.id, outlet.name) for outlet in outlets), True - ) - - -class AtenSwitch(SwitchEntity): - """Represents an ATEN PE switch.""" - - _attr_device_class = SwitchDeviceClass.OUTLET - - def __init__( - self, device: AtenPE, info: DeviceInfo, mac: str, outlet: str, name: str - ) -> None: - """Initialize an ATEN PE switch.""" - self._device = device - self._outlet = outlet - self._attr_device_info = info - self._attr_unique_id = f"{mac}-{outlet}" - self._attr_name = name or f"Outlet {outlet}" - - @override - async def async_turn_on(self, **kwargs: Any) -> None: - """Turn the switch on.""" - await self._device.setOutletStatus(self._outlet, "on") - self._attr_is_on = True - - @override - async def async_turn_off(self, **kwargs: Any) -> None: - """Turn the switch off.""" - await self._device.setOutletStatus(self._outlet, "off") - self._attr_is_on = False - - async def async_update(self) -> None: - """Process update from entity.""" - status = await self._device.displayOutletStatus(self._outlet) - if status == "on": - self._attr_is_on = True - elif status == "off": - self._attr_is_on = False diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index f229812a492f..badf0f970722 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -590,12 +590,6 @@ "config_flow": true, "iot_class": "local_polling" }, - "aten_pe": { - "name": "ATEN Rack PDU", - "integration_type": "hub", - "config_flow": false, - "iot_class": "local_polling" - }, "atlanticcityelectric": { "name": "Atlantic City Electric", "integration_type": "virtual", diff --git a/requirements_all.txt b/requirements_all.txt index c8ca1941e47c..8b2f1321771b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -583,9 +583,6 @@ asyncsleepiq==1.7.1 # homeassistant.components.sftp_storage asyncssh==2.21.0 -# homeassistant.components.aten_pe -# atenpdu==0.3.6 - # homeassistant.components.aurora auroranoaa==0.0.5 diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index 84e976ec166f..3e8a7e6ee1c8 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -165,7 +165,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [ "asterisk_mbox", "asuswrt", "atag", - "aten_pe", "atome", "august", "aurora", @@ -1111,7 +1110,6 @@ INTEGRATIONS_WITHOUT_SCALE = [ "asterisk_mbox", "asuswrt", "atag", - "aten_pe", "atome", "august", "aurora",