1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00

Deprecate MH-Z19 CO2 Sensor (ADR-0019) (#63508)

This commit is contained in:
Franck Nijhof 2022-01-05 23:34:48 +01:00 committed by GitHub
parent 25490b892b
commit 7b79a0a086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,12 @@ def setup_platform(
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the available CO2 sensors."""
_LOGGER.warning(
"The MH-Z19 CO2 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"
)
try:
co2sensor.read_mh_z19(config.get(CONF_SERIAL_DEVICE))