diff --git a/homeassistant/components/generic_thermostat/config_flow.py b/homeassistant/components/generic_thermostat/config_flow.py index 5dbccfabe8c..564d7bc01a3 100644 --- a/homeassistant/components/generic_thermostat/config_flow.py +++ b/homeassistant/components/generic_thermostat/config_flow.py @@ -116,7 +116,11 @@ async def _validate_config( CONFIG_FLOW = { - "user": SchemaFlowFormStep(vol.Schema(CONFIG_SCHEMA), next_step="presets"), + "user": SchemaFlowFormStep( + vol.Schema(CONFIG_SCHEMA), + validate_user_input=_validate_config, + next_step="presets", + ), "presets": SchemaFlowFormStep(vol.Schema(PRESETS_SCHEMA)), } diff --git a/homeassistant/components/generic_thermostat/strings.json b/homeassistant/components/generic_thermostat/strings.json index d81889c83cd..9fe1091d334 100644 --- a/homeassistant/components/generic_thermostat/strings.json +++ b/homeassistant/components/generic_thermostat/strings.json @@ -1,5 +1,8 @@ { "config": { + "error": { + "min_max_runtime": "Minimum run time must be less than the maximum run time." + }, "step": { "presets": { "data": { @@ -45,7 +48,7 @@ }, "options": { "error": { - "min_max_runtime": "Minimum run time must be less than the maximum run time." + "min_max_runtime": "[%key:component::generic_thermostat::config::error::min_max_runtime%]" }, "step": { "init": {