diff --git a/.coveragerc b/.coveragerc index b2b9f096d69..c02a6fefe75 100644 --- a/.coveragerc +++ b/.coveragerc @@ -365,7 +365,6 @@ omit = homeassistant/components/epion/sensor.py homeassistant/components/epson/__init__.py homeassistant/components/epson/media_player.py - homeassistant/components/epsonworkforce/sensor.py homeassistant/components/eq3btsmart/__init__.py homeassistant/components/eq3btsmart/climate.py homeassistant/components/eq3btsmart/const.py diff --git a/CODEOWNERS b/CODEOWNERS index df1a7370fcd..6e7b7e6f8f4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -399,7 +399,6 @@ build.json @home-assistant/supervisor /tests/components/epion/ @lhgravendeel /homeassistant/components/epson/ @pszafer /tests/components/epson/ @pszafer -/homeassistant/components/epsonworkforce/ @ThaStealth /homeassistant/components/eq3btsmart/ @eulemitkeule @dbuezas /tests/components/eq3btsmart/ @eulemitkeule @dbuezas /homeassistant/components/escea/ @lazdavila diff --git a/homeassistant/brands/epson.json b/homeassistant/brands/epson.json deleted file mode 100644 index 80d5db942a2..00000000000 --- a/homeassistant/brands/epson.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "domain": "epson", - "name": "Epson", - "integrations": ["epson", "epsonworkforce"] -} diff --git a/homeassistant/components/epsonworkforce/__init__.py b/homeassistant/components/epsonworkforce/__init__.py deleted file mode 100644 index 5efd217b1dd..00000000000 --- a/homeassistant/components/epsonworkforce/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""The epsonworkforce component.""" diff --git a/homeassistant/components/epsonworkforce/manifest.json b/homeassistant/components/epsonworkforce/manifest.json deleted file mode 100644 index 855689bab7d..00000000000 --- a/homeassistant/components/epsonworkforce/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "domain": "epsonworkforce", - "name": "Epson Workforce", - "codeowners": ["@ThaStealth"], - "documentation": "https://www.home-assistant.io/integrations/epsonworkforce", - "iot_class": "local_polling", - "loggers": ["epsonprinter_pkg"], - "requirements": ["epsonprinter==0.0.9"] -} diff --git a/homeassistant/components/epsonworkforce/sensor.py b/homeassistant/components/epsonworkforce/sensor.py deleted file mode 100644 index dea611a3c3a..00000000000 --- a/homeassistant/components/epsonworkforce/sensor.py +++ /dev/null @@ -1,117 +0,0 @@ -"""Support for Epson Workforce Printer.""" - -from __future__ import annotations - -from datetime import timedelta - -from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI -import voluptuous as vol - -from homeassistant.components.sensor import ( - PLATFORM_SCHEMA, - SensorEntity, - SensorEntityDescription, -) -from homeassistant.const import CONF_HOST, CONF_MONITORED_CONDITIONS, PERCENTAGE -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import PlatformNotReady -import homeassistant.helpers.config_validation as cv -from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType - -SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( - SensorEntityDescription( - key="black", - name="Ink level Black", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), - SensorEntityDescription( - key="photoblack", - name="Ink level Photoblack", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), - SensorEntityDescription( - key="magenta", - name="Ink level Magenta", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), - SensorEntityDescription( - key="cyan", - name="Ink level Cyan", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), - SensorEntityDescription( - key="yellow", - name="Ink level Yellow", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), - SensorEntityDescription( - key="clean", - name="Cleaning level", - icon="mdi:water", - native_unit_of_measurement=PERCENTAGE, - ), -) -MONITORED_CONDITIONS: list[str] = [desc.key for desc in SENSOR_TYPES] - -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( - { - vol.Required(CONF_HOST): cv.string, - vol.Required(CONF_MONITORED_CONDITIONS): vol.All( - cv.ensure_list, [vol.In(MONITORED_CONDITIONS)] - ), - } -) -SCAN_INTERVAL = timedelta(minutes=60) - - -def setup_platform( - hass: HomeAssistant, - config: ConfigType, - add_devices: AddEntitiesCallback, - discovery_info: DiscoveryInfoType | None = None, -) -> None: - """Set up the cartridge sensor.""" - host = config.get(CONF_HOST) - - api = EpsonPrinterAPI(host) - if not api.available: - raise PlatformNotReady - - sensors = [ - EpsonPrinterCartridge(api, description) - for description in SENSOR_TYPES - if description.key in config[CONF_MONITORED_CONDITIONS] - ] - - add_devices(sensors, True) - - -class EpsonPrinterCartridge(SensorEntity): - """Representation of a cartridge sensor.""" - - def __init__( - self, api: EpsonPrinterAPI, description: SensorEntityDescription - ) -> None: - """Initialize a cartridge sensor.""" - self._api = api - self.entity_description = description - - @property - def native_value(self): - """Return the state of the device.""" - return self._api.getSensorValue(self.entity_description.key) - - @property - def available(self) -> bool: - """Could the device be accessed during the last update call.""" - return self._api.available - - def update(self) -> None: - """Get the latest data from the Epson printer.""" - self._api.update() diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index f027db93fe0..667639226a1 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -1650,20 +1650,9 @@ }, "epson": { "name": "Epson", - "integrations": { - "epson": { - "integration_type": "hub", - "config_flow": true, - "iot_class": "local_polling", - "name": "Epson" - }, - "epsonworkforce": { - "integration_type": "hub", - "config_flow": false, - "iot_class": "local_polling", - "name": "Epson Workforce" - } - } + "integration_type": "hub", + "config_flow": true, + "iot_class": "local_polling" }, "eq3": { "name": "eQ-3", diff --git a/requirements_all.txt b/requirements_all.txt index bc624ce85be..446d69da244 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -821,9 +821,6 @@ epion==0.0.3 # homeassistant.components.epson epson-projector==0.5.1 -# homeassistant.components.epsonworkforce -epsonprinter==0.0.9 - # homeassistant.components.eq3btsmart eq3btsmart==1.1.6