Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt.climate Namespace Reference

Classes

class  MqttClimate
 
class  MqttTemperatureControlEntity
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
ConfigType valid_humidity_range_configuration (ConfigType config)
 
ConfigType valid_humidity_state_configuration (ConfigType config)
 
ConfigType valid_preset_mode_configuration (ConfigType config)
 

Variables

 _DISCOVERY_SCHEMA_BASE = _PLATFORM_SCHEMA_BASE.extend({}, extra=vol.REMOVE_EXTRA)
 
 _LOGGER = logging.getLogger(__name__)
 
 _PLATFORM_SCHEMA_BASE
 
dictionary COMMAND_TEMPLATE_KEYS
 
string CONF_FAN_MODE_COMMAND_TEMPLATE = "fan_mode_command_template"
 
string CONF_FAN_MODE_COMMAND_TOPIC = "fan_mode_command_topic"
 
string CONF_FAN_MODE_LIST = "fan_modes"
 
string CONF_FAN_MODE_STATE_TEMPLATE = "fan_mode_state_template"
 
string CONF_FAN_MODE_STATE_TOPIC = "fan_mode_state_topic"
 
string CONF_HUMIDITY_COMMAND_TEMPLATE = "target_humidity_command_template"
 
string CONF_HUMIDITY_COMMAND_TOPIC = "target_humidity_command_topic"
 
string CONF_HUMIDITY_MAX = "max_humidity"
 
string CONF_HUMIDITY_MIN = "min_humidity"
 
string CONF_HUMIDITY_STATE_TEMPLATE = "target_humidity_state_template"
 
string CONF_HUMIDITY_STATE_TOPIC = "target_humidity_state_topic"
 
string CONF_PRESET_MODE_COMMAND_TEMPLATE = "preset_mode_command_template"
 
string CONF_PRESET_MODE_COMMAND_TOPIC = "preset_mode_command_topic"
 
string CONF_PRESET_MODE_STATE_TOPIC = "preset_mode_state_topic"
 
string CONF_PRESET_MODE_VALUE_TEMPLATE = "preset_mode_value_template"
 
string CONF_PRESET_MODES_LIST = "preset_modes"
 
string CONF_SWING_MODE_COMMAND_TEMPLATE = "swing_mode_command_template"
 
string CONF_SWING_MODE_COMMAND_TOPIC = "swing_mode_command_topic"
 
string CONF_SWING_MODE_LIST = "swing_modes"
 
string CONF_SWING_MODE_STATE_TEMPLATE = "swing_mode_state_template"
 
string CONF_SWING_MODE_STATE_TOPIC = "swing_mode_state_topic"
 
string CONF_TEMP_HIGH_COMMAND_TEMPLATE = "temperature_high_command_template"
 
string CONF_TEMP_HIGH_COMMAND_TOPIC = "temperature_high_command_topic"
 
string CONF_TEMP_HIGH_STATE_TEMPLATE = "temperature_high_state_template"
 
string CONF_TEMP_HIGH_STATE_TOPIC = "temperature_high_state_topic"
 
string CONF_TEMP_LOW_COMMAND_TEMPLATE = "temperature_low_command_template"
 
string CONF_TEMP_LOW_COMMAND_TOPIC = "temperature_low_command_topic"
 
string CONF_TEMP_LOW_STATE_TEMPLATE = "temperature_low_state_template"
 
string CONF_TEMP_LOW_STATE_TOPIC = "temperature_low_state_topic"
 
string CONF_TEMP_STEP = "temp_step"
 
float DEFAULT_INITIAL_TEMPERATURE = 21.0
 
string DEFAULT_NAME = "MQTT HVAC"
 
 DISCOVERY_SCHEMA
 
 MQTT_CLIMATE_ATTRIBUTES_BLOCKED
 
int PARALLEL_UPDATES = 0
 
 PLATFORM_SCHEMA_MODERN
 
tuple TOPIC_KEYS
 
tuple VALUE_TEMPLATE_KEYS
 

Detailed Description

Support for MQTT climate devices.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.mqtt.climate.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up MQTT climate through YAML and through MQTT discovery.

Definition at line 350 of file climate.py.

◆ valid_humidity_range_configuration()

ConfigType homeassistant.components.mqtt.climate.valid_humidity_range_configuration ( ConfigType  config)
Validate a target_humidity range configuration, throws otherwise.

Definition at line 215 of file climate.py.

◆ valid_humidity_state_configuration()

ConfigType homeassistant.components.mqtt.climate.valid_humidity_state_configuration ( ConfigType  config)
Validate humidity state.

Ensure that if CONF_HUMIDITY_STATE_TOPIC is set then
CONF_HUMIDITY_COMMAND_TOPIC is also set.

Definition at line 225 of file climate.py.

◆ valid_preset_mode_configuration()

ConfigType homeassistant.components.mqtt.climate.valid_preset_mode_configuration ( ConfigType  config)
Validate that the preset mode reset payload is not one of the preset modes.

Definition at line 208 of file climate.py.

Variable Documentation

◆ _DISCOVERY_SCHEMA_BASE

homeassistant.components.mqtt.climate._DISCOVERY_SCHEMA_BASE = _PLATFORM_SCHEMA_BASE.extend({}, extra=vol.REMOVE_EXTRA)
private

Definition at line 340 of file climate.py.

◆ _LOGGER

homeassistant.components.mqtt.climate._LOGGER = logging.getLogger(__name__)
private

Definition at line 92 of file climate.py.

◆ _PLATFORM_SCHEMA_BASE

homeassistant.components.mqtt.climate._PLATFORM_SCHEMA_BASE
private

Definition at line 243 of file climate.py.

◆ COMMAND_TEMPLATE_KEYS

dictionary homeassistant.components.mqtt.climate.COMMAND_TEMPLATE_KEYS
Initial value:
1 = {
2  CONF_FAN_MODE_COMMAND_TEMPLATE,
3  CONF_HUMIDITY_COMMAND_TEMPLATE,
4  CONF_MODE_COMMAND_TEMPLATE,
5  CONF_POWER_COMMAND_TEMPLATE,
6  CONF_PRESET_MODE_COMMAND_TEMPLATE,
7  CONF_SWING_MODE_COMMAND_TEMPLATE,
8  CONF_TEMP_COMMAND_TEMPLATE,
9  CONF_TEMP_HIGH_COMMAND_TEMPLATE,
10  CONF_TEMP_LOW_COMMAND_TEMPLATE,
11 }

Definition at line 171 of file climate.py.

◆ CONF_FAN_MODE_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_FAN_MODE_COMMAND_TEMPLATE = "fan_mode_command_template"

Definition at line 98 of file climate.py.

◆ CONF_FAN_MODE_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_FAN_MODE_COMMAND_TOPIC = "fan_mode_command_topic"

Definition at line 99 of file climate.py.

◆ CONF_FAN_MODE_LIST

string homeassistant.components.mqtt.climate.CONF_FAN_MODE_LIST = "fan_modes"

Definition at line 100 of file climate.py.

◆ CONF_FAN_MODE_STATE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_FAN_MODE_STATE_TEMPLATE = "fan_mode_state_template"

Definition at line 101 of file climate.py.

◆ CONF_FAN_MODE_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_FAN_MODE_STATE_TOPIC = "fan_mode_state_topic"

Definition at line 102 of file climate.py.

◆ CONF_HUMIDITY_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_COMMAND_TEMPLATE = "target_humidity_command_template"

Definition at line 104 of file climate.py.

◆ CONF_HUMIDITY_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_COMMAND_TOPIC = "target_humidity_command_topic"

Definition at line 105 of file climate.py.

◆ CONF_HUMIDITY_MAX

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_MAX = "max_humidity"

Definition at line 108 of file climate.py.

◆ CONF_HUMIDITY_MIN

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_MIN = "min_humidity"

Definition at line 109 of file climate.py.

◆ CONF_HUMIDITY_STATE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_STATE_TEMPLATE = "target_humidity_state_template"

Definition at line 106 of file climate.py.

◆ CONF_HUMIDITY_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_HUMIDITY_STATE_TOPIC = "target_humidity_state_topic"

Definition at line 107 of file climate.py.

◆ CONF_PRESET_MODE_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_PRESET_MODE_COMMAND_TEMPLATE = "preset_mode_command_template"

Definition at line 114 of file climate.py.

◆ CONF_PRESET_MODE_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_PRESET_MODE_COMMAND_TOPIC = "preset_mode_command_topic"

Definition at line 112 of file climate.py.

◆ CONF_PRESET_MODE_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_PRESET_MODE_STATE_TOPIC = "preset_mode_state_topic"

Definition at line 111 of file climate.py.

◆ CONF_PRESET_MODE_VALUE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_PRESET_MODE_VALUE_TEMPLATE = "preset_mode_value_template"

Definition at line 113 of file climate.py.

◆ CONF_PRESET_MODES_LIST

string homeassistant.components.mqtt.climate.CONF_PRESET_MODES_LIST = "preset_modes"

Definition at line 115 of file climate.py.

◆ CONF_SWING_MODE_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_SWING_MODE_COMMAND_TEMPLATE = "swing_mode_command_template"

Definition at line 116 of file climate.py.

◆ CONF_SWING_MODE_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_SWING_MODE_COMMAND_TOPIC = "swing_mode_command_topic"

Definition at line 117 of file climate.py.

◆ CONF_SWING_MODE_LIST

string homeassistant.components.mqtt.climate.CONF_SWING_MODE_LIST = "swing_modes"

Definition at line 118 of file climate.py.

◆ CONF_SWING_MODE_STATE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_SWING_MODE_STATE_TEMPLATE = "swing_mode_state_template"

Definition at line 119 of file climate.py.

◆ CONF_SWING_MODE_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_SWING_MODE_STATE_TOPIC = "swing_mode_state_topic"

Definition at line 120 of file climate.py.

◆ CONF_TEMP_HIGH_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_TEMP_HIGH_COMMAND_TEMPLATE = "temperature_high_command_template"

Definition at line 121 of file climate.py.

◆ CONF_TEMP_HIGH_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_TEMP_HIGH_COMMAND_TOPIC = "temperature_high_command_topic"

Definition at line 122 of file climate.py.

◆ CONF_TEMP_HIGH_STATE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_TEMP_HIGH_STATE_TEMPLATE = "temperature_high_state_template"

Definition at line 123 of file climate.py.

◆ CONF_TEMP_HIGH_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_TEMP_HIGH_STATE_TOPIC = "temperature_high_state_topic"

Definition at line 124 of file climate.py.

◆ CONF_TEMP_LOW_COMMAND_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_TEMP_LOW_COMMAND_TEMPLATE = "temperature_low_command_template"

Definition at line 125 of file climate.py.

◆ CONF_TEMP_LOW_COMMAND_TOPIC

string homeassistant.components.mqtt.climate.CONF_TEMP_LOW_COMMAND_TOPIC = "temperature_low_command_topic"

Definition at line 126 of file climate.py.

◆ CONF_TEMP_LOW_STATE_TEMPLATE

string homeassistant.components.mqtt.climate.CONF_TEMP_LOW_STATE_TEMPLATE = "temperature_low_state_template"

Definition at line 127 of file climate.py.

◆ CONF_TEMP_LOW_STATE_TOPIC

string homeassistant.components.mqtt.climate.CONF_TEMP_LOW_STATE_TOPIC = "temperature_low_state_topic"

Definition at line 128 of file climate.py.

◆ CONF_TEMP_STEP

string homeassistant.components.mqtt.climate.CONF_TEMP_STEP = "temp_step"

Definition at line 129 of file climate.py.

◆ DEFAULT_INITIAL_TEMPERATURE

float homeassistant.components.mqtt.climate.DEFAULT_INITIAL_TEMPERATURE = 21.0

Definition at line 131 of file climate.py.

◆ DEFAULT_NAME

string homeassistant.components.mqtt.climate.DEFAULT_NAME = "MQTT HVAC"

Definition at line 96 of file climate.py.

◆ DISCOVERY_SCHEMA

homeassistant.components.mqtt.climate.DISCOVERY_SCHEMA
Initial value:
1 = vol.All(
2  _DISCOVERY_SCHEMA_BASE,
3  valid_preset_mode_configuration,
4  valid_humidity_range_configuration,
5  valid_humidity_state_configuration,
6 )

Definition at line 342 of file climate.py.

◆ MQTT_CLIMATE_ATTRIBUTES_BLOCKED

homeassistant.components.mqtt.climate.MQTT_CLIMATE_ATTRIBUTES_BLOCKED
Initial value:
1 = frozenset(
2  {
3  climate.ATTR_CURRENT_HUMIDITY,
4  climate.ATTR_CURRENT_TEMPERATURE,
5  climate.ATTR_FAN_MODE,
6  climate.ATTR_FAN_MODES,
7  climate.ATTR_HUMIDITY,
8  climate.ATTR_HVAC_ACTION,
9  climate.ATTR_HVAC_MODES,
10  climate.ATTR_MAX_HUMIDITY,
11  climate.ATTR_MAX_TEMP,
12  climate.ATTR_MIN_HUMIDITY,
13  climate.ATTR_MIN_TEMP,
14  climate.ATTR_PRESET_MODE,
15  climate.ATTR_PRESET_MODES,
16  climate.ATTR_SWING_MODE,
17  climate.ATTR_SWING_MODES,
18  climate.ATTR_TARGET_TEMP_HIGH,
19  climate.ATTR_TARGET_TEMP_LOW,
20  climate.ATTR_TARGET_TEMP_STEP,
21  climate.ATTR_TEMPERATURE,
22  }
23 )

Definition at line 133 of file climate.py.

◆ PARALLEL_UPDATES

int homeassistant.components.mqtt.climate.PARALLEL_UPDATES = 0

Definition at line 94 of file climate.py.

◆ PLATFORM_SCHEMA_MODERN

homeassistant.components.mqtt.climate.PLATFORM_SCHEMA_MODERN
Initial value:
1 = vol.All(
2  _PLATFORM_SCHEMA_BASE,
3  valid_preset_mode_configuration,
4  valid_humidity_range_configuration,
5  valid_humidity_state_configuration,
6 )

Definition at line 333 of file climate.py.

◆ TOPIC_KEYS

tuple homeassistant.components.mqtt.climate.TOPIC_KEYS
Initial value:
1 = (
2  CONF_ACTION_TOPIC,
3  CONF_CURRENT_HUMIDITY_TOPIC,
4  CONF_CURRENT_TEMP_TOPIC,
5  CONF_FAN_MODE_COMMAND_TOPIC,
6  CONF_FAN_MODE_STATE_TOPIC,
7  CONF_HUMIDITY_COMMAND_TOPIC,
8  CONF_HUMIDITY_STATE_TOPIC,
9  CONF_MODE_COMMAND_TOPIC,
10  CONF_MODE_STATE_TOPIC,
11  CONF_POWER_COMMAND_TOPIC,
12  CONF_PRESET_MODE_COMMAND_TOPIC,
13  CONF_PRESET_MODE_STATE_TOPIC,
14  CONF_SWING_MODE_COMMAND_TOPIC,
15  CONF_SWING_MODE_STATE_TOPIC,
16  CONF_TEMP_COMMAND_TOPIC,
17  CONF_TEMP_HIGH_COMMAND_TOPIC,
18  CONF_TEMP_HIGH_STATE_TOPIC,
19  CONF_TEMP_LOW_COMMAND_TOPIC,
20  CONF_TEMP_LOW_STATE_TOPIC,
21  CONF_TEMP_STATE_TOPIC,
22 )

Definition at line 184 of file climate.py.

◆ VALUE_TEMPLATE_KEYS

tuple homeassistant.components.mqtt.climate.VALUE_TEMPLATE_KEYS
Initial value:
1 = (
2  CONF_CURRENT_HUMIDITY_TEMPLATE,
3  CONF_CURRENT_TEMP_TEMPLATE,
4  CONF_FAN_MODE_STATE_TEMPLATE,
5  CONF_HUMIDITY_STATE_TEMPLATE,
6  CONF_MODE_STATE_TEMPLATE,
7  CONF_ACTION_TEMPLATE,
8  CONF_PRESET_MODE_VALUE_TEMPLATE,
9  CONF_SWING_MODE_STATE_TEMPLATE,
10  CONF_TEMP_HIGH_STATE_TEMPLATE,
11  CONF_TEMP_LOW_STATE_TEMPLATE,
12  CONF_TEMP_STATE_TEMPLATE,
13 )

Definition at line 157 of file climate.py.