Base Class
All climate entities inherit fromClimateEntity, which is defined in homeassistant.components.climate.
HVAC Modes
Climate entities operate in different HVAC modes:OFF- HVAC is offHEAT- Heating modeCOOL- Cooling modeHEAT_COOL- Heat/cool to a temperature rangeAUTO- Automatic modeDRY- Dry/dehumidify modeFAN_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 ifClimateEntityFeature.TARGET_TEMPERATURE is set.
target_temperature_high / target_temperature_low
Temperature range for heat/cool mode. Required ifClimateEntityFeature.TARGET_TEMPERATURE_RANGE is set.
current_humidity
The current humidity reading.target_humidity
The target humidity. Required ifClimateEntityFeature.TARGET_HUMIDITY is set.
hvac_action
The current action (what the device is actually doing).OFF- Device is offHEATING- Device is heatingCOOLING- Device is coolingDRYING- Device is dryingIDLE- Device is idle (on but not actively heating/cooling)FAN- Device fan is running
fan_mode / fan_modes
Fan mode control. RequiresClimateEntityFeature.FAN_MODE.
auto, low, medium, high, on, off
preset_mode / preset_modes
Preset mode control. RequiresClimateEntityFeature.PRESET_MODE.
none, eco, away, boost, comfort, home, sleep, activity
swing_mode / swing_modes
Swing mode control. RequiresClimateEntityFeature.SWING_MODE.
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.TARGET_TEMPERATURE- Can set target temperatureTARGET_TEMPERATURE_RANGE- Can set temperature range (high/low)TARGET_HUMIDITY- Can set target humidityFAN_MODE- Supports fan mode controlPRESET_MODE- Supports preset modesSWING_MODE- Supports swing modeSWING_HORIZONTAL_MODE- Supports horizontal swingTURN_ON- Can be turned onTURN_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, andtemperature_unit - The
stateproperty is final and returns the currenthvac_modevalue - Always declare
supported_featuresto 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 modeclimate.set_temperature- Set target temperatureclimate.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)