home-assistant/core · error · AlexaUnsupportedThermostatTargetStateError
INVALID_TARGET_STATE
INVALID_TARGET_STATE
Error message
The current target temperature is not set, cannot adjust target temperature
What it means
For AdjustTargetTemperature on a single-setpoint thermostat (no target_temp_high/low), HA reads the current target temperature from the entity's temperature attribute. If it is None - the thermostat has no current target set - it raises AlexaUnsupportedThermostatTargetStateError (INVALID_TARGET_STATE) because there is no baseline to add the delta to.
Source
Thrown at homeassistant/components/alexa/handlers.py:990
response.add_context_property(
{
"name": "upperSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp_high, "scale": API_TEMP_UNITS[unit]},
}
)
response.add_context_property(
{
"name": "lowerSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp_low, "scale": API_TEMP_UNITS[unit]},
}
)
else:
current_target_temp: str | None = entity.attributes.get(ATTR_TEMPERATURE)
if current_target_temp is None:
raise AlexaUnsupportedThermostatTargetStateError(
"The current target temperature is not set, "
"cannot adjust target temperature"
)
target_temp = float(current_target_temp) + temp_delta
if target_temp < min_temp or target_temp > max_temp:
raise AlexaTempRangeError(hass, target_temp, min_temp, max_temp)
data = {ATTR_ENTITY_ID: entity.entity_id, ATTR_TEMPERATURE: target_temp}
response.add_context_property(
{
"name": "targetSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp, "scale": API_TEMP_UNITS[unit]},
}
)
service = SERVICE_SET_TEMPERATURE[domain]View on GitHub (pinned to 58a3fdb3ea)
Solutions
- First set an absolute target ('set the thermostat to 21 degrees'), then use adjust commands.
- If the attribute should have a value, fix the underlying integration so temperature is always reported when the device is controllable.
- Turn the thermostat on if it is off and re-check the temperature attribute in developer tools.
Defensive patterns
Strategy: validation
Validate before calling
current = state.attributes.get('temperature')
if current is None:
# seed an absolute setpoint first, then adjust
await hass.services.async_call(
'climate', 'set_temperature',
{'entity_id': eid, 'temperature': 21.0}, blocking=True,
) Type guard
def has_target_temp(attrs: dict) -> bool:
return attrs.get('temperature') is not None Try / catch
try:
await process_directive(directive)
except AlexaUnsupportedThermostatTargetStateError:
_LOGGER.info('No current target on %s; set absolute temperature first', eid) Prevention
- Ensure the climate entity always reports a target temperature while controllable.
- In routines, issue an absolute set before any relative adjust.
- Fix integrations that clear the temperature attribute when idle/off.
When it happens
Trigger: 'Alexa, make it warmer by 2 degrees' on a climate entity whose temperature attribute is currently absent (off, uninitialized, or integration did not report a target).
Common situations: Thermostat turned off or integration (e.g. generic_thermostat, DIY MQTT climate) that clears temperature when idle; newly added entities before their first setpoint; voice adjusting before any manual set.
Related errors
- TEMPERATURE_VALUE_OUT_OF_RANGE
- UNSUPPORTED_THERMOSTAT_MODE
- INVALID_DIRECTIVE
- INVALID_VALUE
- AUTHORIZATION_REQUIRED
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/00668c4824c969ff.
Report an issue: GitHub.