Deprecate Sense HAT (ADR-0019) (#63500)
This commit is contained in:
parent
d0d5222bf4
commit
640e625c2c
2 changed files with 16 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
"""Support for Sense Hat LEDs."""
|
"""Support for Sense Hat LEDs."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from sense_hat import SenseHat
|
from sense_hat import SenseHat
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
@ -27,6 +29,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
{vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string}
|
{vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(
|
def setup_platform(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -35,6 +39,12 @@ def setup_platform(
|
||||||
discovery_info: DiscoveryInfoType | None = None,
|
discovery_info: DiscoveryInfoType | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the Sense Hat Light platform."""
|
"""Set up the Sense Hat Light platform."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"The Sense HAT 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"
|
||||||
|
)
|
||||||
|
|
||||||
sensehat = SenseHat()
|
sensehat = SenseHat()
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,12 @@ def setup_platform(
|
||||||
discovery_info: DiscoveryInfoType | None = None,
|
discovery_info: DiscoveryInfoType | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the Sense HAT sensor platform."""
|
"""Set up the Sense HAT sensor platform."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"The Sense HAT 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"
|
||||||
|
)
|
||||||
data = SenseHatData(config.get(CONF_IS_HAT_ATTACHED))
|
data = SenseHatData(config.get(CONF_IS_HAT_ATTACHED))
|
||||||
display_options = config[CONF_DISPLAY_OPTIONS]
|
display_options = config[CONF_DISPLAY_OPTIONS]
|
||||||
entities = [
|
entities = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue