mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Move imports in venstar component (#27478)
This commit is contained in:
parent
0a2ec30ce3
commit
c5b12d6006
@ -1,6 +1,7 @@
|
|||||||
"""Support for Venstar WiFi Thermostats."""
|
"""Support for Venstar WiFi Thermostats."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from venstarcolortouch import VenstarColorTouch
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA
|
from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA
|
||||||
@ -71,7 +72,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Venstar thermostat."""
|
"""Set up the Venstar thermostat."""
|
||||||
import venstarcolortouch
|
|
||||||
|
|
||||||
username = config.get(CONF_USERNAME)
|
username = config.get(CONF_USERNAME)
|
||||||
password = config.get(CONF_PASSWORD)
|
password = config.get(CONF_PASSWORD)
|
||||||
@ -84,7 +84,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
else:
|
else:
|
||||||
proto = "http"
|
proto = "http"
|
||||||
|
|
||||||
client = venstarcolortouch.VenstarColorTouch(
|
client = VenstarColorTouch(
|
||||||
addr=host, timeout=timeout, user=username, password=password, proto=proto
|
addr=host, timeout=timeout, user=username, password=password, proto=proto
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user