Move imports to top for danfoss_air (#29435)

This commit is contained in:
springstan 2019-12-04 20:27:51 +01:00 committed by Martin Hjelmare
parent f8d607bdf5
commit a2a3c50555

View File

@ -2,6 +2,8 @@
from datetime import timedelta from datetime import timedelta
import logging import logging
from pydanfossair.commands import ReadCommand
from pydanfossair.danfossclient import DanfossClient
import voluptuous as vol import voluptuous as vol
from homeassistant.const import CONF_HOST from homeassistant.const import CONF_HOST
@ -40,8 +42,6 @@ class DanfossAir:
"""Initialize the Danfoss Air CCM connection.""" """Initialize the Danfoss Air CCM connection."""
self._data = {} self._data = {}
from pydanfossair.danfossclient import DanfossClient
self._client = DanfossClient(host) self._client = DanfossClient(host)
def get_value(self, item): def get_value(self, item):
@ -56,7 +56,6 @@ class DanfossAir:
def update(self): def update(self):
"""Use the data from Danfoss Air API.""" """Use the data from Danfoss Air API."""
_LOGGER.debug("Fetching data from Danfoss Air CCM module") _LOGGER.debug("Fetching data from Danfoss Air CCM module")
from pydanfossair.commands import ReadCommand
self._data[ReadCommand.exhaustTemperature] = self._client.command( self._data[ReadCommand.exhaustTemperature] = self._client.command(
ReadCommand.exhaustTemperature ReadCommand.exhaustTemperature