Deprecate Bosch BME280 Environmental Sensor (ADR-0019) (#62934)

This commit is contained in:
Franck Nijhof 2021-12-28 21:38:46 +01:00 committed by GitHub
parent 4da7508e9d
commit 4edf6163f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}