mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Move imports to top for zhong_hong (#29194)
This commit is contained in:
parent
fe34ea1865
commit
e5aa050def
@ -2,6 +2,8 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
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 import PLATFORM_SCHEMA, ClimateDevice
|
||||||
from homeassistant.components.climate.const import (
|
from homeassistant.components.climate.const import (
|
||||||
@ -71,7 +73,6 @@ MODE_TO_STATE = {
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the ZhongHong HVAC platform."""
|
"""Set up the ZhongHong HVAC platform."""
|
||||||
from zhong_hong_hvac.hub import ZhongHongGateway
|
|
||||||
|
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
port = config.get(CONF_PORT)
|
port = config.get(CONF_PORT)
|
||||||
@ -117,9 +118,8 @@ class ZhongHongClimate(ClimateDevice):
|
|||||||
|
|
||||||
def __init__(self, hub, addr_out, addr_in):
|
def __init__(self, hub, addr_out, addr_in):
|
||||||
"""Set up the ZhongHong climate devices."""
|
"""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._hub = hub
|
||||||
self._current_operation = None
|
self._current_operation = None
|
||||||
self._current_temperature = None
|
self._current_temperature = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user