From 8c679639913f0981c4d135ac5316ebf2199d8f2f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 5 Jan 2022 23:35:41 +0100 Subject: [PATCH] Deprecate Raspberry Pi GPIO (ADR-0019) (#63503) --- homeassistant/components/rpi_gpio/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/rpi_gpio/__init__.py b/homeassistant/components/rpi_gpio/__init__.py index 94336980fa6..95e3ded1c64 100644 --- a/homeassistant/components/rpi_gpio/__init__.py +++ b/homeassistant/components/rpi_gpio/__init__.py @@ -1,4 +1,6 @@ """Support for controlling GPIO pins of a Raspberry Pi.""" +import logging + from RPi import GPIO # pylint: disable=import-error from homeassistant.const import ( @@ -16,9 +18,17 @@ PLATFORMS = [ Platform.SWITCH, ] +_LOGGER = logging.getLogger(__name__) + def setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the Raspberry PI GPIO component.""" + _LOGGER.warning( + "The Raspberry Pi GPIO integration is deprecated and will be removed " + "in Home Assistant Core 2022.6; 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" + ) def cleanup_gpio(event): """Stuff to do before stopping."""