14 #define LOG_CLIMATE(prefix, type, obj) \ 15 if ((obj) != nullptr) { \ 16 ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ 67 ESPDEPRECATED(
"set_away() is deprecated, please use .set_preset(CLIMATE_PRESET_AWAY) instead",
"v1.20")
69 ESPDEPRECATED(
"set_away() is deprecated, please use .set_preset(CLIMATE_PRESET_AWAY) instead",
"v1.20")
100 ESPDEPRECATED(
"get_away() is deprecated, please use .get_preset() instead",
"v1.20")
179 float current_temperature{NAN};
220 void add_on_state_callback(std::function<
void()> &&callback);
228 void add_on_control_callback(std::function<
void()> &&callback);
241 void publish_state();
250 void set_visual_min_temperature_override(
float visual_min_temperature_override);
251 void set_visual_max_temperature_override(
float visual_max_temperature_override);
252 void set_visual_temperature_step_override(
float target,
float current);
261 bool set_custom_fan_mode_(
const std::string &
mode);
267 bool set_custom_preset_(
const std::string &preset);
293 void dump_traits_(
const char *tag);
This class is used to encode all control actions on a climate device.
The climate device is off (inactive or no power)
ClimateSwingMode swing_mode
The active swing mode of the climate device.
float target_temperature_low
optional< std::string > custom_preset_
ClimatePreset
Enum for all preset modes.
float target_temperature
The target temperature of the climate device.
const optional< ClimateMode > & get_mode() const
optional< float > target_temperature_
This class contains all static data for climate devices.
void apply(Climate *climate)
Apply these settings to the climate device.
Struct used to save the state of the climate device in restore memory.
optional< ClimateFanMode > fan_mode_
const optional< float > & get_target_temperature_low() const
float target_temperature_high
The maximum target temperature of the climate device, for climate devices with split target temperatu...
float target_temperature_high
optional< float > target_temperature_high_
float target_temperature_high
bool uses_custom_fan_mode
ClimateCall & set_swing_mode(ClimateSwingMode swing_mode)
Set the swing mode of the climate device.
float target_temperature_low
ClimateSwingMode swing_mode
ClimateSwingMode
Enum for all modes a climate swing can be in.
optional< std::string > custom_fan_mode
The active custom fan mode of the climate device.
ClimateCall & set_target_temperature_low(float target_temperature_low)
Set the low point target temperature of the climate device.
const optional< std::string > & get_custom_preset() const
ClimateCall & set_target_temperature(float target_temperature)
Set the target temperature of the climate device.
optional< ClimateSwingMode > swing_mode_
const optional< ClimatePreset > & get_preset() const
ESPDEPRECATED("away is deprecated, use preset instead", "v1.20") bool away
Whether the climate device is in away mode.
optional< ClimatePreset > preset
The active preset of the climate device.
optional< ClimatePreset > preset_
ClimateCall & set_preset(ClimatePreset preset)
Set the preset of the climate device.
ClimateAction
Enum for the current action of the climate device. Values match those of ClimateMode.
ClimateCall & set_fan_mode(ClimateFanMode fan_mode)
Set the fan mode of the climate device.
const optional< std::string > & get_custom_fan_mode() const
const optional< float > & get_target_temperature() const
optional< std::string > custom_fan_mode_
ClimateMode
Enum for all modes a climate device can be in.
The climate device is off.
optional< std::string > custom_preset
The active custom preset mode of the climate device.
ClimateCall & set_target_temperature_high(float target_temperature_high)
Set the high point target temperature of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
ClimateSwingMode swing_mode
const optional< ClimateFanMode > & get_fan_mode() const
ClimateCall & set_mode(ClimateMode mode)
Set the mode of the climate device.
const optional< ClimateSwingMode > & get_swing_mode() const
optional< ClimateMode > mode_
ClimateCall(Climate *parent)
const optional< float > & get_target_temperature_high() const
ESPDEPRECATED("set_away() is deprecated, please use .set_preset(CLIMATE_PRESET_AWAY) instead", "v1.20") ClimateCall &set_away(bool away)
ClimateCall to_call(Climate *climate)
Convert this struct to a climate call that can be performed.
esphome::climate::Climate __attribute__
optional< float > target_temperature_low_
float target_temperature_low
The minimum target temperature of the climate device, for climate devices with split target temperatu...
ClimateDevice - This is the base class for all climate integrations.