Move state constants to __init__ for all thermostats

This commit is contained in:
zyell 2015-09-12 07:27:05 -07:00
parent 775d3198ae
commit de89de890f
2 changed files with 6 additions and 5 deletions

View File

@ -23,6 +23,10 @@ SCAN_INTERVAL = 60
SERVICE_SET_AWAY_MODE = "set_away_mode" SERVICE_SET_AWAY_MODE = "set_away_mode"
SERVICE_SET_TEMPERATURE = "set_temperature" SERVICE_SET_TEMPERATURE = "set_temperature"
STATE_HEAT = "heat"
STATE_COOL = "cool"
STATE_IDLE = "idle"
ATTR_CURRENT_TEMPERATURE = "current_temperature" ATTR_CURRENT_TEMPERATURE = "current_temperature"
ATTR_AWAY_MODE = "away_mode" ATTR_AWAY_MODE = "away_mode"
ATTR_MAX_TEMP = "max_temp" ATTR_MAX_TEMP = "max_temp"

View File

@ -5,13 +5,10 @@ Adds support for Nest thermostats.
""" """
import logging import logging
from homeassistant.components.thermostat import ThermostatDevice from homeassistant.components.thermostat import (ThermostatDevice, STATE_COOL,
STATE_IDLE, STATE_HEAT)
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, TEMP_CELCIUS) from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, TEMP_CELCIUS)
STATE_HEAT = "heat"
STATE_COOL = "cool"
STATE_IDLE = "idle"
REQUIREMENTS = ['python-nest==2.6.0'] REQUIREMENTS = ['python-nest==2.6.0']