mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Deprecate Bosch BME280 Environmental Sensor (ADR-0019) (#62934)
This commit is contained in:
parent
4da7508e9d
commit
4edf6163f7
@ -1,4 +1,6 @@
|
|||||||
"""The bme280 component."""
|
"""The bme280 component."""
|
||||||
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||||
@ -84,9 +86,19 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
extra=vol.ALLOW_EXTRA,
|
extra=vol.ALLOW_EXTRA,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
"""Set up BME280 component."""
|
"""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]
|
bme280_config = config[DOMAIN]
|
||||||
for bme280_conf in bme280_config:
|
for bme280_conf in bme280_config:
|
||||||
discovery_info = {SENSOR_DOMAIN: bme280_conf}
|
discovery_info = {SENSOR_DOMAIN: bme280_conf}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user