moved imports to top level (#27677)
parent
ecc276de38
commit
5b410ff3a5
|
@ -2,6 +2,7 @@
|
||||||
import logging
|
import logging
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
import digitalocean
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
@ -38,7 +39,6 @@ CONFIG_SCHEMA = vol.Schema(
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Set up the Digital Ocean component."""
|
"""Set up the Digital Ocean component."""
|
||||||
import digitalocean
|
|
||||||
|
|
||||||
conf = config[DOMAIN]
|
conf = config[DOMAIN]
|
||||||
access_token = conf.get(CONF_ACCESS_TOKEN)
|
access_token = conf.get(CONF_ACCESS_TOKEN)
|
||||||
|
@ -63,7 +63,6 @@ class DigitalOcean:
|
||||||
|
|
||||||
def __init__(self, access_token):
|
def __init__(self, access_token):
|
||||||
"""Initialize the Digital Ocean connection."""
|
"""Initialize the Digital Ocean connection."""
|
||||||
import digitalocean
|
|
||||||
|
|
||||||
self._access_token = access_token
|
self._access_token = access_token
|
||||||
self.data = None
|
self.data = None
|
||||||
|
|
Loading…
Reference in New Issue