home-assistant/core · error · HomeAssistantError

failed_to_parse_hvac_action

failed_to_parse_hvac_action

Error message

Could not determine HVAC action: {mode_and_active}, {current_temperature}, {target_temperature_low}

What it means

HomeAssistantError with translation_key 'failed_to_parse_hvac_action' (placeholders: mode_and_active, current_temperature, target_temperature_low), raised at the end of _read_hvac_action when the mode/action match chain fell through. Notably in AUTO mode the code needs both current_temperature and target_temperature_low to infer heating vs cooling; if either is None, inference is impossible and this error raises.

Source

Thrown at homeassistant/components/bryant_evolution/climate.py:197

                return HVACAction.HEATING
            case "COOL":
                return HVACAction.COOLING
            case "OFF":
                return HVACAction.OFF
            case "AUTO":
                # In AUTO, we need to figure out what the actual action is
                # based on the setpoints.
                if (
                    self.current_temperature is not None
                    and self.target_temperature_low is not None
                ):
                    if self.current_temperature > self.target_temperature_low:
                        # If the system is on and the current temperature is
                        # higher than the point at which heating would activate,
                        # then we must be cooling.
                        return HVACAction.COOLING
                    return HVACAction.HEATING
        raise HomeAssistantError(
            translation_domain=DOMAIN,
            translation_key="failed_to_parse_hvac_action",
            translation_placeholders={
                "mode_and_active": mode_and_active,
                "current_temperature": str(self.current_temperature),
                "target_temperature_low": str(self.target_temperature_low),
            },
        )

    @override
    async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
        """Set new target hvac mode."""
        if hvac_mode == HVACMode.HEAT_COOL:
            hvac_mode = HVACMode.AUTO
        if not await self._client.set_hvac_mode(hvac_mode):
            raise HomeAssistantError(
                translation_domain=DOMAIN, translation_key="failed_to_set_hvac_mode"
            )

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Wait for the next successful poll so current_temperature is populated, then retry
  2. Set both a heating and cooling setpoint on the system so AUTO inference has its inputs
  3. Check thermostat sensor health if outdoor/indoor temperature reads fail persistently
  4. Report persistent falls-through with the logged placeholder values upstream
Defensive patterns

Strategy: validation

Validate before calling

# In AUTO mode, inference needs both readings:
if (
    climate.current_temperature is not None
    and climate.target_temperature_low is not None
):
    action = climate.hvac_action  # safe to consume
else:
    # missing inputs; hvac_action read would raise

Type guard

def can_infer_auto_action(
    current_temperature: float | None,
    target_temperature_low: float | None,
) -> bool:
    """True when AUTO-mode action inference has all required inputs."""
    return current_temperature is not None and target_temperature_low is not None

Prevention

When it happens

Trigger: System in AUTO (HEAT_COOL) with a missing temperature reading (current_temperature is None) or missing heating setpoint (target_temperature_low is None); gateway returning a mode string outside the match cases (HEAT/COOL/OFF/AUTO) while active.

Common situations: Fresh setup before the first temperature poll completes; sensor outage on the thermostat; heating setpoint never configured so target_temperature_low stays None in AUTO.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/1bc6266bd9ef0b76. Report an issue: GitHub.