Skip to main content
The climate platform allows integrations to control HVAC (heating, ventilation, air conditioning) devices. Climate entities can control temperature, humidity, fan mode, and more.

Base Class

All climate entities inherit from ClimateEntity, which is defined in homeassistant.components.climate.

HVAC Modes

Climate entities operate in different HVAC modes:
Available HVAC modes:
  • OFF - HVAC is off
  • HEAT - Heating mode
  • COOL - Cooling mode
  • HEAT_COOL - Heat/cool to a temperature range
  • AUTO - Automatic mode
  • DRY - Dry/dehumidify mode
  • FAN_ONLY - Fan only mode

Required Properties

hvac_mode

The current HVAC mode.

hvac_modes

List of available HVAC modes.

temperature_unit

The unit of temperature (Celsius or Fahrenheit).

Required Methods

set_hvac_mode

Set the HVAC mode.

set_temperature

Set target temperature (and optionally HVAC mode).

Optional Properties

current_temperature

The current temperature reading.

target_temperature

The target temperature. Required if ClimateEntityFeature.TARGET_TEMPERATURE is set.

target_temperature_high / target_temperature_low

Temperature range for heat/cool mode. Required if ClimateEntityFeature.TARGET_TEMPERATURE_RANGE is set.

current_humidity

The current humidity reading.

target_humidity

The target humidity. Required if ClimateEntityFeature.TARGET_HUMIDITY is set.

hvac_action

The current action (what the device is actually doing).
Available HVAC actions:
  • OFF - Device is off
  • HEATING - Device is heating
  • COOLING - Device is cooling
  • DRYING - Device is drying
  • IDLE - Device is idle (on but not actively heating/cooling)
  • FAN - Device fan is running

fan_mode / fan_modes

Fan mode control. Requires ClimateEntityFeature.FAN_MODE.
Common fan modes: auto, low, medium, high, on, off

preset_mode / preset_modes

Preset mode control. Requires ClimateEntityFeature.PRESET_MODE.
Common preset modes: none, eco, away, boost, comfort, home, sleep, activity

swing_mode / swing_modes

Swing mode control. Requires ClimateEntityFeature.SWING_MODE.
Common swing modes: off, on, vertical, horizontal, both

min_temp / max_temp

Temperature range limits.

min_humidity / max_humidity

Humidity range limits.

supported_features

Flags indicating which features are supported.
Available features:
  • TARGET_TEMPERATURE - Can set target temperature
  • TARGET_TEMPERATURE_RANGE - Can set temperature range (high/low)
  • TARGET_HUMIDITY - Can set target humidity
  • FAN_MODE - Supports fan mode control
  • PRESET_MODE - Supports preset modes
  • SWING_MODE - Supports swing mode
  • SWING_HORIZONTAL_MODE - Supports horizontal swing
  • TURN_ON - Can be turned on
  • TURN_OFF - Can be turned off

Example Implementation

Advanced Example with Multiple Features

Turn On/Off Support

Climate devices can implement turn on/off if they support it:

Important Notes

  • Climate entities must set hvac_mode, hvac_modes, and temperature_unit
  • The state property is final and returns the current hvac_mode value
  • Always declare supported_features to indicate which features your device supports
  • Home Assistant handles temperature unit conversion automatically
  • Service calls validate parameters against min/max values and available modes
  • Use async_write_ha_state() after state changes to update Home Assistant

Services

The climate platform automatically registers these services:
  • climate.set_hvac_mode - Set HVAC mode
  • climate.set_temperature - Set target temperature
  • climate.set_humidity - Set target humidity (if supported)
  • climate.set_fan_mode - Set fan mode (if supported)
  • climate.set_preset_mode - Set preset mode (if supported)
  • climate.set_swing_mode - Set swing mode (if supported)
  • climate.turn_on - Turn on (if supported)
  • climate.turn_off - Turn off (if supported)
  • climate.toggle - Toggle on/off (if supported)

See Also