Move constants to const.py
in generic Thermostat (#120789)
This commit is contained in:
parent
099110767a
commit
75b1700ed3
7 changed files with 56 additions and 36 deletions
34
homeassistant/components/generic_thermostat/const.py
Normal file
34
homeassistant/components/generic_thermostat/const.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
"""Constants for the Generic Thermostat helper."""
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
PRESET_ACTIVITY,
|
||||
PRESET_AWAY,
|
||||
PRESET_COMFORT,
|
||||
PRESET_ECO,
|
||||
PRESET_HOME,
|
||||
PRESET_SLEEP,
|
||||
)
|
||||
from homeassistant.const import Platform
|
||||
|
||||
DOMAIN = "generic_thermostat"
|
||||
|
||||
PLATFORMS = [Platform.CLIMATE]
|
||||
|
||||
CONF_AC_MODE = "ac_mode"
|
||||
CONF_COLD_TOLERANCE = "cold_tolerance"
|
||||
CONF_HEATER = "heater"
|
||||
CONF_HOT_TOLERANCE = "hot_tolerance"
|
||||
CONF_MIN_DUR = "min_cycle_duration"
|
||||
CONF_PRESETS = {
|
||||
p: f"{p}_temp"
|
||||
for p in (
|
||||
PRESET_AWAY,
|
||||
PRESET_COMFORT,
|
||||
PRESET_ECO,
|
||||
PRESET_HOME,
|
||||
PRESET_SLEEP,
|
||||
PRESET_ACTIVITY,
|
||||
)
|
||||
}
|
||||
CONF_SENSOR = "target_sensor"
|
||||
DEFAULT_TOLERANCE = 0.3
|
Loading…
Add table
Add a link
Reference in a new issue