Hugh Saunders bb51837346
Generic Thermostat Add Target Min Max to UI config (#131168)
Currently you can configure the minium and maximum target temperatures
if you create a generic thermostat in YAML. If you create it via the
UI, there is no option to configure them, you just get the climate
domain defaults.

This commit adds minimum and maximum fields to the first stage of the
generic thermostat config flow, so that UI users can also set min and
max.

Min and max are important as usually users want to select target
temperatures within a relatively narrow band, while the defaults create
a wide band. The wide band makes it hard to be accurate enough with the
arc style temperatue selector on the thermostat card.
2024-12-03 22:23:04 +01:00

37 lines
775 B
Python

"""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_MAX_TEMP = "max_temp"
CONF_MIN_DUR = "min_cycle_duration"
CONF_MIN_TEMP = "min_temp"
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