diff --git a/homeassistant/components/generic_thermostat/climate.py b/homeassistant/components/generic_thermostat/climate.py index d68eaccbb0c956..f82da4483eb0e7 100644 --- a/homeassistant/components/generic_thermostat/climate.py +++ b/homeassistant/components/generic_thermostat/climate.py @@ -63,7 +63,9 @@ CONF_COLD_TOLERANCE, CONF_HEATER, CONF_HOT_TOLERANCE, + CONF_MAX_TEMP, CONF_MIN_DUR, + CONF_MIN_TEMP, CONF_PRESETS, CONF_SENSOR, DEFAULT_TOLERANCE, @@ -77,8 +79,6 @@ CONF_INITIAL_HVAC_MODE = "initial_hvac_mode" CONF_KEEP_ALIVE = "keep_alive" -CONF_MIN_TEMP = "min_temp" -CONF_MAX_TEMP = "max_temp" CONF_PRECISION = "precision" CONF_TARGET_TEMP = "target_temp" CONF_TEMP_STEP = "target_temp_step" diff --git a/homeassistant/components/generic_thermostat/config_flow.py b/homeassistant/components/generic_thermostat/config_flow.py index 5b0eae8ff66f8f..1fbeaefde6bc18 100644 --- a/homeassistant/components/generic_thermostat/config_flow.py +++ b/homeassistant/components/generic_thermostat/config_flow.py @@ -21,7 +21,9 @@ CONF_COLD_TOLERANCE, CONF_HEATER, CONF_HOT_TOLERANCE, + CONF_MAX_TEMP, CONF_MIN_DUR, + CONF_MIN_TEMP, CONF_PRESETS, CONF_SENSOR, DEFAULT_TOLERANCE, @@ -57,6 +59,16 @@ vol.Optional(CONF_MIN_DUR): selector.DurationSelector( selector.DurationSelectorConfig(allow_negative=False) ), + vol.Optional(CONF_MIN_TEMP): selector.NumberSelector( + selector.NumberSelectorConfig( + mode=selector.NumberSelectorMode.BOX, unit_of_measurement=DEGREE, step=0.1 + ) + ), + vol.Optional(CONF_MAX_TEMP): selector.NumberSelector( + selector.NumberSelectorConfig( + mode=selector.NumberSelectorMode.BOX, unit_of_measurement=DEGREE, step=0.1 + ) + ), } PRESETS_SCHEMA = { diff --git a/homeassistant/components/generic_thermostat/const.py b/homeassistant/components/generic_thermostat/const.py index 51927297b6345a..f0e6f1a7d73d59 100644 --- a/homeassistant/components/generic_thermostat/const.py +++ b/homeassistant/components/generic_thermostat/const.py @@ -18,7 +18,9 @@ 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 ( diff --git a/homeassistant/components/generic_thermostat/strings.json b/homeassistant/components/generic_thermostat/strings.json index fd89bec6349956..58280e99543455 100644 --- a/homeassistant/components/generic_thermostat/strings.json +++ b/homeassistant/components/generic_thermostat/strings.json @@ -12,7 +12,9 @@ "min_cycle_duration": "Minimum cycle duration", "name": "[%key:common::config_flow::data::name%]", "cold_tolerance": "Cold tolerance", - "hot_tolerance": "Hot tolerance" + "hot_tolerance": "Hot tolerance", + "min_temp": "Minimum target temperature", + "max_temp": "Maximum target temperature" }, "data_description": { "ac_mode": "Set the actuator specified to be treated as a cooling device instead of a heating device.", @@ -45,7 +47,9 @@ "target_sensor": "[%key:component::generic_thermostat::config::step::user::data::target_sensor%]", "min_cycle_duration": "[%key:component::generic_thermostat::config::step::user::data::min_cycle_duration%]", "cold_tolerance": "[%key:component::generic_thermostat::config::step::user::data::cold_tolerance%]", - "hot_tolerance": "[%key:component::generic_thermostat::config::step::user::data::hot_tolerance%]" + "hot_tolerance": "[%key:component::generic_thermostat::config::step::user::data::hot_tolerance%]", + "min_temp": "[%key:component::generic_thermostat::config::step::user::data::min_temp%]", + "max_temp": "[%key:component::generic_thermostat::config::step::user::data::max_temp%]" }, "data_description": { "heater": "[%key:component::generic_thermostat::config::step::user::data_description::heater%]",