Move imports to top for zhong_hong (#29194)
parent
fe34ea1865
commit
e5aa050def
|
@ -2,6 +2,8 @@
|
|||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
from zhong_hong_hvac.hub import ZhongHongGateway
|
||||
from zhong_hong_hvac.hvac import HVAC as ZhongHongHVAC
|
||||
|
||||
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
|
||||
from homeassistant.components.climate.const import (
|
||||
|
@ -71,7 +73,6 @@ MODE_TO_STATE = {
|
|||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the ZhongHong HVAC platform."""
|
||||
from zhong_hong_hvac.hub import ZhongHongGateway
|
||||
|
||||
host = config.get(CONF_HOST)
|
||||
port = config.get(CONF_PORT)
|
||||
|
@ -117,9 +118,8 @@ class ZhongHongClimate(ClimateDevice):
|
|||
|
||||
def __init__(self, hub, addr_out, addr_in):
|
||||
"""Set up the ZhongHong climate devices."""
|
||||
from zhong_hong_hvac.hvac import HVAC
|
||||
|
||||
self._device = HVAC(hub, addr_out, addr_in)
|
||||
self._device = ZhongHongHVAC(hub, addr_out, addr_in)
|
||||
self._hub = hub
|
||||
self._current_operation = None
|
||||
self._current_temperature = None
|
||||
|
|
Loading…
Reference in New Issue