Skip to content

Commit

Permalink
Move imports to top for tof (#29203)
Browse files Browse the repository at this point in the history
* Move imports to top for tof

* Isorted imports
  • Loading branch information
springstan authored and MartinHjelmare committed Nov 29, 2019
1 parent 7b33e57 commit 0e4920d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 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__)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0e4920d

Please sign in to comment.