diff --git a/.coveragerc b/.coveragerc index 78a07b8d916..4c2564a2425 100644 --- a/.coveragerc +++ b/.coveragerc @@ -112,7 +112,6 @@ omit = homeassistant/components/blink/const.py homeassistant/components/blink/sensor.py homeassistant/components/blinksticklight/light.py - homeassistant/components/blinkt/light.py homeassistant/components/blockchain/sensor.py homeassistant/components/bloomsky/* homeassistant/components/bluesound/* diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a0d6396ec30..30f8e0bdac9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -137,7 +137,6 @@ jobs: sed -i "s|# RPi.GPIO|RPi.GPIO|g" ${requirement_file} sed -i "s|# raspihats|raspihats|g" ${requirement_file} sed -i "s|# rpi-rf|rpi-rf|g" ${requirement_file} - sed -i "s|# blinkt|blinkt|g" ${requirement_file} sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file} sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file} sed -i "s|# evdev|evdev|g" ${requirement_file} diff --git a/homeassistant/components/blinkt/__init__.py b/homeassistant/components/blinkt/__init__.py deleted file mode 100644 index 0f61a211559..00000000000 --- a/homeassistant/components/blinkt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""The blinkt component.""" diff --git a/homeassistant/components/blinkt/light.py b/homeassistant/components/blinkt/light.py deleted file mode 100644 index 5b720e13697..00000000000 --- a/homeassistant/components/blinkt/light.py +++ /dev/null @@ -1,103 +0,0 @@ -"""Support for Blinkt! lights on Raspberry Pi.""" -from __future__ import annotations - -import importlib -import logging - -import voluptuous as vol - -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - ATTR_HS_COLOR, - PLATFORM_SCHEMA, - SUPPORT_BRIGHTNESS, - SUPPORT_COLOR, - LightEntity, -) -from homeassistant.const import CONF_NAME -from homeassistant.core import HomeAssistant -import homeassistant.helpers.config_validation as cv -from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -import homeassistant.util.color as color_util - -SUPPORT_BLINKT = SUPPORT_BRIGHTNESS | SUPPORT_COLOR - -DEFAULT_NAME = "blinkt" - -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( - {vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string} -) - -_LOGGER = logging.getLogger(__name__) - - -def setup_platform( - hass: HomeAssistant, - config: ConfigType, - add_entities: AddEntitiesCallback, - discovery_info: DiscoveryInfoType | None = None, -) -> None: - """Set up the Blinkt Light platform.""" - _LOGGER.warning( - "The Blinkt! integration is deprecated and will be removed " - "in Home Assistant Core 2022.4; this integration is removed under " - "Architectural Decision Record 0019, more information can be found here: " - "https://github.com/home-assistant/architecture/blob/master/adr/0019-GPIO.md" - ) - - blinkt = importlib.import_module("blinkt") - - # ensure that the lights are off when exiting - blinkt.set_clear_on_exit() - - name = config[CONF_NAME] - - add_entities( - [BlinktLight(blinkt, name, index) for index in range(blinkt.NUM_PIXELS)] - ) - - -class BlinktLight(LightEntity): - """Representation of a Blinkt! Light.""" - - _attr_supported_features = SUPPORT_BLINKT - _attr_should_poll = False - _attr_assumed_state = True - - def __init__(self, blinkt, name, index): - """Initialize a Blinkt Light. - - Default brightness and white color. - """ - self._blinkt = blinkt - self._attr_name = f"{name}_{index}" - self._index = index - self._attr_is_on = False - self._attr_brightness = 255 - self._attr_hs_color = [0, 0] - - def turn_on(self, **kwargs): - """Instruct the light to turn on and set correct brightness & color.""" - if ATTR_HS_COLOR in kwargs: - self._attr_hs_color = kwargs[ATTR_HS_COLOR] - if ATTR_BRIGHTNESS in kwargs: - self._attr_brightness = kwargs[ATTR_BRIGHTNESS] - - percent_bright = self.brightness / 255 - rgb_color = color_util.color_hs_to_RGB(*self.hs_color) - self._blinkt.set_pixel( - self._index, rgb_color[0], rgb_color[1], rgb_color[2], percent_bright - ) - - self._blinkt.show() - - self._attr_is_on = True - self.schedule_update_ha_state() - - def turn_off(self, **kwargs): - """Instruct the light to turn off.""" - self._blinkt.set_pixel(self._index, 0, 0, 0, 0) - self._blinkt.show() - self._attr_is_on = False - self.schedule_update_ha_state() diff --git a/homeassistant/components/blinkt/manifest.json b/homeassistant/components/blinkt/manifest.json deleted file mode 100644 index ac659f78e11..00000000000 --- a/homeassistant/components/blinkt/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "domain": "blinkt", - "name": "Blinkt!", - "documentation": "https://www.home-assistant.io/integrations/blinkt", - "requirements": ["blinkt==0.1.0"], - "codeowners": [], - "iot_class": "local_push" -} diff --git a/requirements_all.txt b/requirements_all.txt index 966866f3403..68de5e3830e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -413,9 +413,6 @@ blinkpy==0.18.0 # homeassistant.components.blinksticklight blinkstick==1.2.0 -# homeassistant.components.blinkt -# blinkt==0.1.0 - # homeassistant.components.bitcoin blockchain==1.4.4 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 6ebea07ae4b..4ffca14b825 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -18,7 +18,6 @@ COMMENT_REQUIREMENTS = ( "avion", "beacontools", "beewi_smartclim", # depends on bluepy - "blinkt", "bluepy", "bme280spi", "bme680",