home-assistant/core · error · AlexaUnsupportedThermostatModeError
UNSUPPORTED_THERMOSTAT_MODE
UNSUPPORTED_THERMOSTAT_MODE
Error message
The requested thermostat mode {ha_preset} is not supported What it means
Handling Alexa.ThermostatController.SetThermostatMode: the requested Alexa mode (ECO, AUTO, OFF...) is reverse-mapped to an HA preset via API_THERMOSTAT_PRESETS. If that preset is not present in the climate entity's preset_modes attribute list, AlexaUnsupportedThermostatModeError (UNSUPPORTED_THERMOSTAT_MODE) is raised.
Source
Thrown at homeassistant/components/alexa/handlers.py:1044
context: ha.Context,
) -> AlexaResponse:
"""Process a set thermostat mode request."""
operation_list: list[str]
entity = directive.entity
mode = directive.payload["thermostatMode"]
mode = mode if isinstance(mode, str) else mode["value"]
data: dict[str, Any] = {ATTR_ENTITY_ID: entity.entity_id}
ha_preset = next((k for k, v in API_THERMOSTAT_PRESETS.items() if v == mode), None)
if ha_preset:
presets = entity.attributes.get(climate.ATTR_PRESET_MODES) or []
if ha_preset not in presets:
msg = f"The requested thermostat mode {ha_preset} is not supported"
raise AlexaUnsupportedThermostatModeError(msg)
service = climate.SERVICE_SET_PRESET_MODE
data[climate.ATTR_PRESET_MODE] = ha_preset
elif mode == "CUSTOM":
operation_list = entity.attributes.get(climate.ATTR_HVAC_MODES) or []
custom_mode = directive.payload["thermostatMode"]["customName"]
custom_mode = next(
(k for k, v in API_THERMOSTAT_MODES_CUSTOM.items() if v == custom_mode),
None,
)
if custom_mode not in operation_list:
msg = (
f"The requested thermostat mode {mode}: {custom_mode} is not supported"
)
raise AlexaUnsupportedThermostatModeError(msg)
service = climate.SERVICE_SET_HVAC_MODEView on GitHub (pinned to 58a3fdb3ea)
Solutions
- Expose/implement the matching preset in the climate integration so preset_modes includes it (e.g. add 'eco').
- Teach users to phrase the request as an HVAC mode ('heat', 'cool', 'off') instead of a preset.
- Check the entity's preset_modes attribute and align names via integration options or entity customization.
Defensive patterns
Strategy: validation
Validate before calling
presets = state.attributes.get('preset_modes') or []
if requested_preset not in presets:
# reject or map to an hvac_mode call instead
... Type guard
def preset_supported(preset: str, attrs: dict) -> bool:
return preset in (attrs.get('preset_modes') or []) Try / catch
try:
await process_directive(directive)
except AlexaUnsupportedThermostatModeError:
_LOGGER.warning('Preset %s not in preset_modes %s', ha_preset, attrs.get('preset_modes')) Prevention
- Check preset_modes before routing preset voice commands to set_preset_mode.
- Keep preset names identical across the integration and Alexa capability definitions.
- Re-discover devices in Alexa after changing supported presets.
When it happens
Trigger: User says 'set the thermostat to eco/automatic mode' when the entity's preset_modes attribute does not contain the corresponding HA preset (e.g. 'eco' or 'none'), even though the Alexa mode name itself is recognized.
Common situations: Climate entities that implement hvac_mode but not preset modes; integrations naming presets differently ('Energy' vs 'eco'); Alexa defaulting to ECO for 'away' phrasing.
Related errors
- TEMPERATURE_VALUE_OUT_OF_RANGE
- INVALID_TARGET_STATE
- Failed to set preset mode to {preset_mode}.
- INVALID_DIRECTIVE
- INVALID_VALUE
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/b4fad119cd7fd68f.
Report an issue: GitHub.