{"record":{"id":"7e12e3ddab38b749","repo":"home-assistant/core","slug":"heat-cool-is-not-supported-in-this-mode","errorCode":null,"errorMessage":"Heat/Cool is not supported in this mode","messagePattern":"Heat/Cool is not supported in this mode","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/advantage_air/climate.py","lineNumber":242,"sourceCode":"        await self.async_update_ac({\"state\": ADVANTAGE_AIR_STATE_ON})\n\n    @override\n    async def async_turn_off(self) -> None:\n        \"\"\"Set the HVAC State to off.\"\"\"\n        await self.async_update_ac(\n            {\n                \"state\": ADVANTAGE_AIR_STATE_OFF,\n            }\n        )\n\n    @override\n    async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:\n        \"\"\"Set the HVAC Mode and State.\"\"\"\n        if hvac_mode == HVACMode.OFF:\n            await self.async_turn_off()\n            return\n        if hvac_mode == HVACMode.HEAT_COOL and self.preset_mode != ADVANTAGE_AIR_MYAUTO:\n            raise ServiceValidationError(\"Heat/Cool is not supported in this mode\")\n        await self.async_update_ac(\n            {\n                \"state\": ADVANTAGE_AIR_STATE_ON,\n                \"mode\": HASS_HVAC_MODES.get(hvac_mode),\n            }\n        )\n\n    @override\n    async def async_set_fan_mode(self, fan_mode: str) -> None:\n        \"\"\"Set the Fan Mode.\"\"\"\n        if fan_mode == FAN_AUTO and self._ac.get(ADVANTAGE_AIR_AUTOFAN_ENABLED):\n            mode = ADVANTAGE_AIR_MYFAN\n        else:\n            mode = fan_mode\n        await self.async_update_ac({\"fan\": mode})\n\n    @override\n    async def async_set_temperature(self, **kwargs: Any) -> None:","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/advantage_air/climate.py#L224-L260","documentation":"ServiceValidationError thrown by AdvantageAirClimate.async_set_hvac_mode when the user requests HVACMode.HEAT_COOL while the unit's current preset_mode is not ADVANTAGE_AIR_MYAUTO. On this platform, heat/cool (auto) mode is only reachable through the 'myAuto' preset; any other active preset makes the combination invalid, so HA surfaces a user-correctable validation error instead of sending a doomed API command.","triggerScenarios":"Calling climate.set_hvac_mode with hvac_mode: heat_cool (or a UI tap on the heat_cool mode) on an Advantage Air AC/zoned entity whose preset_mode is anything other than myAuto (e.g. myFan, night mode, economy presets).","commonSituations":"Dashboards or automations hardcoding heat_cool as the setpoint-hold mode; Google Home / Alexa voice commands that map 'automatic' to heat_cool; switching presets in the vendor app out of sync with HA's last known state.","solutions":["First switch the preset to myAuto (climate.set_preset_mode with preset_mode: myAuto), then set hvac_mode to heat_cool.","Update automations/scripts to do the two-step sequence instead of calling set_hvac_mode directly.","In lovelace, use a preset-aware climate card or template the mode buttons so heat_cool is only exposed when preset is myAuto.","If the error persists, check coordinator freshness — a stale preset_mode value can make the guard reject a valid request; refresh and retry."],"exampleFix":"// before\nawait climate.async_set_hvac_mode(ACMode.HEAT_COOL)\n\n// after\nif preset_mode != \"myAuto\":\n    await climate.async_set_preset_mode(\"myAuto\")\nawait climate.async_set_hvac_mode(ACMode.HEAT_COOL)","handlingStrategy":"validation","validationCode":"async def set_heat_cool(climate) -> None:\n    \"\"\"Guarded heat/cool: only valid when preset is myAuto.\"\"\"\n    if climate.preset_mode != \"myAuto\":\n        await climate.async_set_preset_mode(\"myAuto\")\n    await climate.async_set_hvac_mode(ACMode.HEAT_COOL)","typeGuard":"def supports_heat_cool_now(climate) -> bool:\n    \"\"\"Heat/cool is selectable only under the myAuto preset.\"\"\"\n    return climate.preset_mode == \"myAuto\"","tryCatchPattern":"from homeassistant.exceptions import ServiceValidationError\n\ntry:\n    await climate.async_set_hvac_mode(ACMode.HEAT_COOL)\nexcept ServiceValidationError as err:\n    # user-correctable: switch preset first\n    await climate.async_set_preset_mode(\"myAuto\")\n    await climate.async_set_hvac_mode(ACMode.HEAT_COOL)","preventionTips":["Automations should always set preset myAuto before requesting heat_cool.","Hide the heat_cool chip in dashboards unless the preset matches.","Keep the coordinator data fresh so preset_mode reflects the controller's real state."],"tags":["homeassistant","advantage-air","climate","validation"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}