home-assistant/core · error · HomeAssistantError
Operation mode not supported
Error message
Operation mode not supported
What it means
Raised by the A. O. Smith water heater entity when a service call asks it to switch to an operation mode it does not expose. The entity only accepts modes present in its operation_list, which is built from MODE_AOSMITH_TO_HA (the modes the device itself reports supporting). Any other mode string is rejected before the client call is made.
Source
Thrown at homeassistant/components/aosmith/water_heater.py:137
return self.device.status.temperature_setpoint_maximum
@property
@override
def current_operation(self) -> str:
"""Return the current operation mode."""
return MODE_AOSMITH_TO_HA.get(self.device.status.current_mode, STATE_OFF)
@property
@override
def is_away_mode_on(self) -> bool:
"""Return True if away mode is on."""
return self.device.status.current_mode is AOSmithOperationMode.VACATION
@override
async def async_set_operation_mode(self, operation_mode: str) -> None:
"""Set new target operation mode."""
if operation_mode not in self.operation_list:
raise HomeAssistantError("Operation mode not supported")
aosmith_mode = MODE_HA_TO_AOSMITH.get(operation_mode)
if aosmith_mode is not None:
await self.client.update_mode(self.junction_id, aosmith_mode)
await self.coordinator.async_request_refresh()
@override
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
temperature = kwargs.get("temperature")
if temperature is not None:
await self.client.update_setpoint(self.junction_id, temperature)
await self.coordinator.async_request_refresh()
@override
async def async_turn_away_mode_on(self) -> None:View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Check the entity's current operation_list attribute in Developer Tools > States and use one of those exact strings
- Update the automation/script/dashboard to use a supported mode (e.g. STATE_OFF, 'electric', 'heat_pump', 'vacation' as exposed)
- If the mode should be supported, verify the device status/current_mode mapping in MODE_AOSMITH_TO_HA and file an issue with py-aosmith if the mapping is missing
Example fix
# before
action:
service: water_heater.set_operation_mode
target: {entity_id: water_heater.my_heater}
data: {operation_mode: "heat"}
# after - use a mode from the entity's operation_list
action:
service: water_heater.set_operation_mode
target: {entity_id: water_heater.my_heater}
data: {operation_mode: "electric"} Defensive patterns
Strategy: validation
Validate before calling
# In HA, read the entity state before acting
state = hass.states.get("water_heater.my_heater")
supported = state.attributes["operation_list"]
if mode not in supported:
# pick another or notify
... Prevention
- Read operation_list from the entity state before sending set_operation_mode
- Never hardcode mode strings in reusable scripts; parameterize and validate them
- Keep automations per-device instead of copying them across heater models
When it happens
Trigger: Calling water_heater.set_operation_mode with a mode (e.g. 'heat_pump' or 'eco') that is not in this entity's operation_list; the list is derived from MODE_AOSMITH_TO_HA and may be narrower than the generic HA water heater modes. Can also happen if a script/automation was written for a different heater model and reused here.
Common situations: Automation or dashboard card hardcodes a mode string; YAML mode name typo; mode supported on one A. O. Smith model but not another; user copies example config from docs for a different device generation.
Related errors
- not_a_water_heater_device
- username_not_normalized
- Error communicating with API: {err}
- Command not found. Exiting sequence
- No application_credentials platform for {domain}
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/759636691e799a44.
Report an issue: GitHub.