Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Climate Entity

A climate entity controls heating, ventilation and air conditioning (HVAC) devices. This can range from simple fans to personal air conditioning units to integrated building devices.

Features

NameRWDescription
on_offThe device can be turned on and off. The active HVAC mode after power on is device specific and must be reflected in the state attribute.
heatThe device supports heating.
coolThe device supports cooling.
current_temperatureThe device can measure the current temperature.
target_temperatureThe device supports a target temperature for heating or cooling.
🚧 target_temperature_rangeThe device supports a target temperature range.
🚧 fanThe device has a controllable fan.

Attributes

Entity attributes are controlled by features. Multiple features can act on the same attribute.

AttributeFeaturesTypeValuesDescription
stateon_offenumStatesState of the climate device, corresponds to HVAC mode.
heat
cool
fan
current_temperaturecurrent_temperaturenumber
target_temperaturetarget_temperaturenumber
🚧 target_temperature_hightarget_temperature_rangenumber
🚧 target_temperature_lowtarget_temperature_rangenumber
🚧 fan_modefanenum

See entity options for temperature unit and ranges.

States

The climate entity provides the following entity state values and represents the currently set HVAC mode of the device:

ValueDescription
OFFThe climate device is switched off.
HEATThe device is set to heating, optionally to a set target temperature.
COOLThe device is set to cooling, optionally to a set target temperature.
HEAT_COOLThe device is set to heat or cool to a target temperature range.
FANFan-only mode without heating or cooling.
AUTOThe device is set to automatic mode. This is device dependant, e.g. according to a schedule, presence detection, etc.

Note: the current mode may not be the active state of the device. E.g. if the mode is set to AUTO the climate unit may be heating, cooling, idle, etc. at a specific point in time.

See common entity states.

Device Classes

None.

Options

NameTypeDefaultDescription
temperature_unitenumCELSIUSThe unit of temperature measurement: CELSIUS, FAHRENHEIT. If not specified, the remote settings are used.
target_temperature_stepnumber0.5 / 1Step value for the UI for setting the target temperature. Defaults: CELSIUS = 0.5, 'FAHRENHEIT` = 1. Smallest step size: 0.1
max_temperaturenumber30Maximum temperature to show in the UI for the target temperature range.
min_temperaturenumber10Minimum temperature to show in the UI for the target temperature range.
🚧 fan_modesenum

🚧 Planned feature.

Integration API

Commands

The integration driver has to implement a handler for the entity_command message to process the following command requests within msg_data.cmd_id.

  • The command request must be acknowledged with a result response message.
  • Once the value has been set or confirmed by the physical device, an entity_change event message with the new value(s) must be sent.
cmd_idParametersDescription
on-Switch on the climate device.
off-Switch off the climate device.
hvac_modehvac_modeSet the device to heating, cooling, etc. See state.
target_temperaturetemperatureChange the target temperature
🚧 target_temperature_rangetemperature_high
temperature_low
🚧 fan_modeenum

Events

The entity_change event must be emitted by the integration driver if the state or an attribute of the climate device changes. Either after anentity_command or if the climate device has been updated externally through a user or another system. This keeps the remote in sync with the real state of the entity without the need of constant polling.

The following attributes are supported:

AttributeDescription
hvac_modeNew HVAC mode. See state.
current_temperatureCurrent temperature value.
target_temperatureChanged target temperature value.
🚧 target_temperature_highChanged high target temperature value.
🚧 target_temperature_lowChanged low target temperature value.
🚧 fan_modeChanged fan mode.

At least one attribute must be specified in the entity_change message. If the entity state and a climate attribute changed at the same time, they may both be included in the same message. It's also valid to always send every attribute.

Command examples

on

{
  "kind": "req",
  "id": 123,
  "msg": "entity_command",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "cmd_id": "on"
  }
}

off

{
  "kind": "req",
  "id": 123,
  "msg": "entity_command",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "cmd_id": "off"
  }
}

hvac_mode

{
  "kind": "req",
  "id": 123,
  "msg": "entity_command",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "cmd_id": "hvac_mode",
    "params": {
      "hvac_mode": "COOL"
    }
  }
}

Combined with target temperature

{
  "kind": "req",
  "id": 123,
  "msg": "entity_command",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "cmd_id": "hvac_mode",
    "params": {
      "hvac_mode": "COOL",
      "temperature": 23
    }
  }
}

target_temperature

{
  "kind": "req",
  "id": 123,
  "msg": "entity_command",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "cmd_id": "target_temperature",
    "params": {
      "temperature": 23
    }
  }
}

Event examples

State change event

{
  "kind": "event",
  "msg": "entity_change",
  "cat": "ENTITY",
  "msg_data": {
    "entity_type": "climate",
    "entity_id": "climate-1",
    "attributes": {
      "hvac_mode": "HEAT",
      "current_temperature": 19.5,
      "target_temperature": 21.0
    }
  }
}