From 0e9282a404c7b0d31024b8ac1709aa3af90dbb45 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 21 Dec 2021 17:23:02 +0100 Subject: [PATCH] Deprecate pi4ioe5v9xxxx integration (ADR-0019) (#62491) --- .../components/pi4ioe5v9xxxx/binary_sensor.py | 11 +++++++++++ homeassistant/components/pi4ioe5v9xxxx/switch.py | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py b/homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py index bdec7714eef..58436f3f8ea 100644 --- a/homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py +++ b/homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py @@ -1,4 +1,6 @@ """Support for binary sensor using RPi GPIO.""" +import logging + from pi4ioe5v9xxxx import pi4ioe5v9xxxx import voluptuous as vol @@ -30,9 +32,18 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( } ) +_LOGGER = logging.getLogger(__name__) + def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the IO expander devices.""" + _LOGGER.warning( + "The pi4ioe5v9xxxx IO Expander 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" + ) + pins = config[CONF_PINS] binary_sensors = [] diff --git a/homeassistant/components/pi4ioe5v9xxxx/switch.py b/homeassistant/components/pi4ioe5v9xxxx/switch.py index 85bde509070..0946bbefa8f 100644 --- a/homeassistant/components/pi4ioe5v9xxxx/switch.py +++ b/homeassistant/components/pi4ioe5v9xxxx/switch.py @@ -1,4 +1,6 @@ """Allows to configure a switch using RPi GPIO.""" +import logging + from pi4ioe5v9xxxx import pi4ioe5v9xxxx import voluptuous as vol @@ -29,9 +31,18 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( } ) +_LOGGER = logging.getLogger(__name__) + def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the swiches devices.""" + _LOGGER.warning( + "The pi4ioe5v9xxxx IO Expander 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" + ) + pins = config.get(CONF_PINS) switches = []