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()); \ 179 float current_temperature{NAN};
182 float current_humidity{NAN};
218 void add_on_state_callback(std::function<
void(
Climate &)> &&callback);
226 void add_on_control_callback(std::function<
void(
ClimateCall &)> &&callback);
239 void publish_state();
248 void set_visual_min_temperature_override(
float visual_min_temperature_override);
249 void set_visual_max_temperature_override(
float visual_max_temperature_override);
250 void set_visual_temperature_step_override(
float target,
float current);
251 void set_visual_min_humidity_override(
float visual_min_humidity_override);
252 void set_visual_max_humidity_override(
float visual_max_humidity_override);
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
optional< float > target_temperature_high_
float target_temperature_high
bool uses_custom_fan_mode
float target_humidity
The target humidity of the climate device.
ClimateCall & set_swing_mode(ClimateSwingMode swing_mode)
Set the swing mode of the climate device.
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
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_
ClimateCall & set_target_humidity(float target_humidity)
Set the target humidity of the climate device.
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
optional< float > target_humidity_
ClimateCall & set_mode(ClimateMode mode)
Set the mode of the climate device.
const optional< ClimateSwingMode > & get_swing_mode() const
Implementation of SPI Controller mode.
optional< ClimateMode > mode_
ClimateCall(Climate *parent)
const optional< float > & get_target_temperature_high() const
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_
const optional< float > & get_target_humidity() const
ClimateDevice - This is the base class for all climate integrations.