mirror of
https://github.com/home-assistant/core.git
synced 2025-05-02 13:17:53 +00:00
Move imports to top for lacrosse (#29405)
This commit is contained in:
parent
09e2be02d3
commit
2df189b58e
@ -2,6 +2,8 @@
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import pylacrosse
|
||||
from serial import SerialException
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import ENTITY_ID_FORMAT, PLATFORM_SCHEMA
|
||||
@ -61,8 +63,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the LaCrosse sensors."""
|
||||
import pylacrosse
|
||||
from serial import SerialException
|
||||
|
||||
usb_device = config.get(CONF_DEVICE)
|
||||
baud = int(config.get(CONF_BAUD))
|
||||
|
Loading…
x
Reference in New Issue
Block a user