mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Deprecate Raspberry Pi GPIO (ADR-0019) (#63503)
This commit is contained in:
parent
c88c3e9abb
commit
8c67963991
@ -1,4 +1,6 @@
|
|||||||
"""Support for controlling GPIO pins of a Raspberry Pi."""
|
"""Support for controlling GPIO pins of a Raspberry Pi."""
|
||||||
|
import logging
|
||||||
|
|
||||||
from RPi import GPIO # pylint: disable=import-error
|
from RPi import GPIO # pylint: disable=import-error
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -16,9 +18,17 @@ PLATFORMS = [
|
|||||||
Platform.SWITCH,
|
Platform.SWITCH,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the Raspberry PI GPIO component."""
|
"""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):
|
def cleanup_gpio(event):
|
||||||
"""Stuff to do before stopping."""
|
"""Stuff to do before stopping."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user