{"record":{"id":"a2048504d3d58723","repo":"home-assistant/core","slug":"failed-to-set-hvac-mode","errorCode":"failed_to_set_hvac_mode","errorMessage":"Failed to set HVAC mode","messagePattern":"Failed to set HVAC mode","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bryant_evolution/climate.py","lineNumber":213,"sourceCode":"                        return HVACAction.COOLING\n                    return HVACAction.HEATING\n        raise HomeAssistantError(\n            translation_domain=DOMAIN,\n            translation_key=\"failed_to_parse_hvac_action\",\n            translation_placeholders={\n                \"mode_and_active\": mode_and_active,\n                \"current_temperature\": str(self.current_temperature),\n                \"target_temperature_low\": str(self.target_temperature_low),\n            },\n        )\n\n    @override\n    async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:\n        \"\"\"Set new target hvac mode.\"\"\"\n        if hvac_mode == HVACMode.HEAT_COOL:\n            hvac_mode = HVACMode.AUTO\n        if not await self._client.set_hvac_mode(hvac_mode):\n            raise HomeAssistantError(\n                translation_domain=DOMAIN, translation_key=\"failed_to_set_hvac_mode\"\n            )\n        self._attr_hvac_mode = hvac_mode\n        self._async_write_ha_state()\n\n    @override\n    async def async_set_temperature(self, **kwargs: Any) -> None:\n        \"\"\"Set new target temperature.\"\"\"\n        if value := kwargs.get(ATTR_TARGET_TEMP_HIGH):\n            temp = int(value)\n            if not await self._client.set_cooling_setpoint(temp):\n                raise HomeAssistantError(\n                    translation_domain=DOMAIN, translation_key=\"failed_to_set_clsp\"\n                )\n            self._attr_target_temperature_high = temp\n\n        if value := kwargs.get(ATTR_TARGET_TEMP_LOW):\n            temp = int(value)","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bryant_evolution/climate.py#L195-L231","documentation":"HomeAssistantError with translation_key 'failed_to_set_hvac_mode', raised in async_set_hvac_mode when the client's set_hvac_mode() returns falsy — the gateway did not acknowledge/apply the mode change. HEAT_COOL is transparently mapped to AUTO before sending. The entity state is only updated after a successful set.","triggerScenarios":"User switches the climate entity to heat/cool/auto/off while the gateway is unreachable or rejects the write; websocket session stale so the command never lands; invalid mode for the current system configuration.","commonSituations":"Mode change attempts during gateway outages; HA UI mode toggle failing after long uptime with a dead session; system in a lockout (e.g. during defrost) refusing mode writes.","solutions":["Confirm the gateway is online (check the thermostat's local UI)","Reload the integration to re-establish the session, then retry the mode change","Change the mode at the wall thermostat once to verify the system accepts it, then retry from HA","Update integration/library if set_hvac_mode failures are a known regression"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Command only when the entity is available and responsive\nif climate.available:\n    await climate.async_set_hvac_mode(HVACMode.HEAT)","typeGuard":null,"tryCatchPattern":"try:\n    await climate.async_set_hvac_mode(HVACMode.HEAT)\nexcept HomeAssistantError as err:\n    if 'failed_to_set_hvac_mode' in str(err):\n        # gateway rejected the write; verify connectivity and retry","preventionTips":["Verify the mode changes at the wall thermostat to rule out system-side lockouts","Reload the integration to refresh stale gateway sessions before retrying"],"tags":["bryant-evolution","climate","hvac-mode","command-failure","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}