Deprecate Time of Flight (ADR-0019) (#62955)

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

View File

@ -1,7 +1,7 @@
"""Platform for Time of Flight sensor VL53L1X from STMicroelectronics."""
import asyncio
from functools import partial
import logging
from VL53L1X2 import VL53L1X # pylint: disable=import-error
import voluptuous as vol
@ -30,6 +30,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
}
)
_LOGGER = logging.getLogger(__name__)
def init_tof_0(xshut, sensor):
"""XSHUT port LOW resets the device."""
@ -46,6 +48,12 @@ def init_tof_1(xshut):
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Reset and initialize the VL53L1X ToF Sensor from STMicroelectronics."""
_LOGGER.warning(
"The Time of Flight 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"
)
name = config.get(CONF_NAME)
bus_number = config.get(CONF_I2C_BUS)