From 4edf6163f7caf0ef007432d0f5d7ec1f09a60216 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 28 Dec 2021 21:38:46 +0100 Subject: [PATCH] Deprecate Bosch BME280 Environmental Sensor (ADR-0019) (#62934) --- homeassistant/components/bme280/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/homeassistant/components/bme280/__init__.py b/homeassistant/components/bme280/__init__.py index eca9ac85bc9..591cecdaffe 100644 --- a/homeassistant/components/bme280/__init__.py +++ b/homeassistant/components/bme280/__init__.py @@ -1,4 +1,6 @@ """The bme280 component.""" +import logging + import voluptuous as vol from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN @@ -84,9 +86,19 @@ CONFIG_SCHEMA = vol.Schema( extra=vol.ALLOW_EXTRA, ) +_LOGGER = logging.getLogger(__name__) + async def async_setup(hass, config): """Set up BME280 component.""" + _LOGGER.warning( + "The Bosch BME280 Environmental Sensor 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" + ) + bme280_config = config[DOMAIN] for bme280_conf in bme280_config: discovery_info = {SENSOR_DOMAIN: bme280_conf}