diff --git a/homeassistant/components/tof/sensor.py b/homeassistant/components/tof/sensor.py index d9e85b1e22b..58f50f4899e 100644 --- a/homeassistant/components/tof/sensor.py +++ b/homeassistant/components/tof/sensor.py @@ -1,15 +1,16 @@ """Platform for Time of Flight sensor VL53L1X from STMicroelectronics.""" import asyncio -import logging from functools import partial +import logging +from VL53L1X2 import VL53L1X # pylint: disable=import-error import voluptuous as vol -from homeassistant.components.sensor import PLATFORM_SCHEMA -import homeassistant.helpers.config_validation as cv from homeassistant.components import rpi_gpio +from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) @@ -51,7 +52,6 @@ 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.""" - from VL53L1X2 import VL53L1X # pylint: disable=import-error name = config.get(CONF_NAME) bus_number = config.get(CONF_I2C_BUS)