Move Arduino imports (#27438)
parent
8bbf261302
commit
618cf5fa04
|
@ -1,8 +1,11 @@
|
|||
"""Support for Arduino boards running with the Firmata firmware."""
|
||||
import logging
|
||||
|
||||
import serial
|
||||
import voluptuous as vol
|
||||
|
||||
from PyMata.pymata import PyMata
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
|
||||
from homeassistant.const import CONF_PORT
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
@ -20,7 +23,6 @@ CONFIG_SCHEMA = vol.Schema(
|
|||
|
||||
def setup(hass, config):
|
||||
"""Set up the Arduino component."""
|
||||
import serial
|
||||
|
||||
port = config[DOMAIN][CONF_PORT]
|
||||
|
||||
|
@ -59,7 +61,6 @@ class ArduinoBoard:
|
|||
|
||||
def __init__(self, port):
|
||||
"""Initialize the board."""
|
||||
from PyMata.pymata import PyMata
|
||||
|
||||
self._port = port
|
||||
self._board = PyMata(self._port, verbose=False)
|
||||
|
|
Loading…
Reference in New Issue