ESPHome  2021.10.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::thermostat::ThermostatClimate Class Reference

#include <thermostat_climate.h>

Inheritance diagram for esphome::thermostat::ThermostatClimate:
esphome::climate::Climate esphome::Component esphome::EntityBase

Public Member Functions

 ThermostatClimate ()
 
void setup () override
 
void dump_config () override
 
void set_default_mode (climate::ClimateMode default_mode)
 
void set_set_point_minimum_differential (float differential)
 
void set_cool_deadband (float deadband)
 
void set_cool_overrun (float overrun)
 
void set_heat_deadband (float deadband)
 
void set_heat_overrun (float overrun)
 
void set_supplemental_cool_delta (float delta)
 
void set_supplemental_heat_delta (float delta)
 
void set_cooling_maximum_run_time_in_sec (uint32_t time)
 
void set_heating_maximum_run_time_in_sec (uint32_t time)
 
void set_cooling_minimum_off_time_in_sec (uint32_t time)
 
void set_cooling_minimum_run_time_in_sec (uint32_t time)
 
void set_fan_mode_minimum_switching_time_in_sec (uint32_t time)
 
void set_fanning_minimum_off_time_in_sec (uint32_t time)
 
void set_fanning_minimum_run_time_in_sec (uint32_t time)
 
void set_heating_minimum_off_time_in_sec (uint32_t time)
 
void set_heating_minimum_run_time_in_sec (uint32_t time)
 
void set_idle_minimum_time_in_sec (uint32_t time)
 
void set_sensor (sensor::Sensor *sensor)
 
void set_use_startup_delay (bool use_startup_delay)
 
void set_supports_auto (bool supports_auto)
 
void set_supports_heat_cool (bool supports_heat_cool)
 
void set_supports_cool (bool supports_cool)
 
void set_supports_dry (bool supports_dry)
 
void set_supports_fan_only (bool supports_fan_only)
 
void set_supports_fan_only_action_uses_fan_mode_timer (bool fan_only_action_uses_fan_mode_timer)
 
void set_supports_fan_only_cooling (bool supports_fan_only_cooling)
 
void set_supports_fan_with_cooling (bool supports_fan_with_cooling)
 
void set_supports_fan_with_heating (bool supports_fan_with_heating)
 
void set_supports_heat (bool supports_heat)
 
void set_supports_fan_mode_on (bool supports_fan_mode_on)
 
void set_supports_fan_mode_off (bool supports_fan_mode_off)
 
void set_supports_fan_mode_auto (bool supports_fan_mode_auto)
 
void set_supports_fan_mode_low (bool supports_fan_mode_low)
 
void set_supports_fan_mode_medium (bool supports_fan_mode_medium)
 
void set_supports_fan_mode_high (bool supports_fan_mode_high)
 
void set_supports_fan_mode_middle (bool supports_fan_mode_middle)
 
void set_supports_fan_mode_focus (bool supports_fan_mode_focus)
 
void set_supports_fan_mode_diffuse (bool supports_fan_mode_diffuse)
 
void set_supports_swing_mode_both (bool supports_swing_mode_both)
 
void set_supports_swing_mode_horizontal (bool supports_swing_mode_horizontal)
 
void set_supports_swing_mode_off (bool supports_swing_mode_off)
 
void set_supports_swing_mode_vertical (bool supports_swing_mode_vertical)
 
void set_supports_two_points (bool supports_two_points)
 
void set_normal_config (const ThermostatClimateTargetTempConfig &normal_config)
 
void set_away_config (const ThermostatClimateTargetTempConfig &away_config)
 
Triggerget_cool_action_trigger () const
 
Triggerget_supplemental_cool_action_trigger () const
 
Triggerget_dry_action_trigger () const
 
Triggerget_fan_only_action_trigger () const
 
Triggerget_heat_action_trigger () const
 
Triggerget_supplemental_heat_action_trigger () const
 
Triggerget_idle_action_trigger () const
 
Triggerget_auto_mode_trigger () const
 
Triggerget_cool_mode_trigger () const
 
Triggerget_dry_mode_trigger () const
 
Triggerget_fan_only_mode_trigger () const
 
Triggerget_heat_mode_trigger () const
 
Triggerget_off_mode_trigger () const
 
Triggerget_fan_mode_on_trigger () const
 
Triggerget_fan_mode_off_trigger () const
 
Triggerget_fan_mode_auto_trigger () const
 
Triggerget_fan_mode_low_trigger () const
 
Triggerget_fan_mode_medium_trigger () const
 
Triggerget_fan_mode_high_trigger () const
 
Triggerget_fan_mode_middle_trigger () const
 
Triggerget_fan_mode_focus_trigger () const
 
Triggerget_fan_mode_diffuse_trigger () const
 
Triggerget_swing_mode_both_trigger () const
 
Triggerget_swing_mode_horizontal_trigger () const
 
Triggerget_swing_mode_off_trigger () const
 
Triggerget_swing_mode_vertical_trigger () const
 
Triggerget_temperature_change_trigger () const
 
float cool_deadband ()
 Get current hysteresis values. More...
 
float cool_overrun ()
 
float heat_deadband ()
 
float heat_overrun ()
 
void refresh ()
 Call triggers based on updated climate states (modes/actions) More...
 
bool climate_action_change_delayed ()
 Returns true if a climate action/fan mode transition is being delayed. More...
 
bool fan_mode_change_delayed ()
 
climate::ClimateAction delayed_climate_action ()
 Returns the climate action that is being delayed (check climate_action_change_delayed(), first!) More...
 
climate::ClimateFanMode locked_fan_mode ()
 Returns the fan mode that is locked in (check fan_mode_change_delayed(), first!) More...
 
bool hysteresis_valid ()
 Set point and hysteresis validation. More...
 
void validate_target_temperature ()
 
void validate_target_temperatures ()
 
void validate_target_temperature_low ()
 
void validate_target_temperature_high ()
 
- Public Member Functions inherited from esphome::climate::Climate
 Climate ()
 Construct a climate device with empty name (will be set later). More...
 
 Climate (const std::string &name)
 Construct a climate device with a name. More...
 
 ESPDEPRECATED ("away is deprecated, use preset instead", "v1.20") bool away
 Whether the climate device is in away mode. More...
 
void add_on_state_callback (std::function< void()> &&callback)
 Add a callback for the climate device state, each time the state of the climate device is updated (using publish_state), this callback will be called. More...
 
ClimateCall make_call ()
 Make a climate device control call, this is used to control the climate device, see the ClimateCall description for more info. More...
 
void publish_state ()
 Publish the state of the climate device, to be called from integrations. More...
 
ClimateTraits get_traits ()
 Get the traits of this climate device with all overrides applied. More...
 
void set_visual_min_temperature_override (float visual_min_temperature_override)
 
void set_visual_max_temperature_override (float visual_max_temperature_override)
 
void set_visual_temperature_step_override (float visual_temperature_step_override)
 
- Public Member Functions inherited from esphome::EntityBase
 EntityBase ()
 
 EntityBase (std::string name)
 
const std::string & get_name () const
 
void set_name (const std::string &name)
 
const std::string & get_object_id ()
 
uint32_t get_object_id_hash ()
 
bool is_internal () const
 
void set_internal (bool internal)
 
bool is_disabled_by_default () const
 
void set_disabled_by_default (bool disabled_by_default)
 
const std::string & get_icon () const
 
void set_icon (const std::string &name)
 
- Public Member Functions inherited from esphome::Component
virtual void loop ()
 This method will be called repeatedly. More...
 
virtual float get_setup_priority () const
 priority of setup(). More...
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed ()
 
virtual bool can_proceed ()
 
bool status_has_warning ()
 
bool status_has_error ()
 
void status_set_warning ()
 
void status_set_error ()
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 

Protected Member Functions

void control (const climate::ClimateCall &call) override
 Override control to change settings of the climate device. More...
 
void change_away_ (bool away)
 Change the away setting, will reset target temperatures to defaults. More...
 
climate::ClimateTraits traits () override
 Return the traits of this controller. More...
 
climate::ClimateAction compute_action_ (bool ignore_timers=false)
 Re-compute the required action of this climate controller. More...
 
climate::ClimateAction compute_supplemental_action_ ()
 
void switch_to_action_ (climate::ClimateAction action, bool publish_state=true)
 Switch the climate device to the given climate action. More...
 
void switch_to_supplemental_action_ (climate::ClimateAction action)
 
void trigger_supplemental_action_ ()
 
void switch_to_fan_mode_ (climate::ClimateFanMode fan_mode, bool publish_state=true)
 Switch the climate device to the given climate fan mode. More...
 
void switch_to_mode_ (climate::ClimateMode mode, bool publish_state=true)
 Switch the climate device to the given climate mode. More...
 
void switch_to_swing_mode_ (climate::ClimateSwingMode swing_mode, bool publish_state=true)
 Switch the climate device to the given climate swing mode. More...
 
void check_temperature_change_trigger_ ()
 Check if the temperature change trigger should be called. More...
 
bool idle_action_ready_ ()
 Is the action ready to be called? Returns true if so. More...
 
bool cooling_action_ready_ ()
 
bool drying_action_ready_ ()
 
bool fan_mode_ready_ ()
 
bool fanning_action_ready_ ()
 
bool heating_action_ready_ ()
 
void start_timer_ (ThermostatClimateTimerIndex timer_index)
 Start/cancel/get status of climate action timer. More...
 
bool cancel_timer_ (ThermostatClimateTimerIndex timer_index)
 
bool timer_active_ (ThermostatClimateTimerIndex timer_index)
 
uint32_t timer_duration_ (ThermostatClimateTimerIndex timer_index)
 
std::function< void()> timer_cbf_ (ThermostatClimateTimerIndex timer_index)
 
void cooling_max_run_time_timer_callback_ ()
 set_timeout() callbacks for various actions (see above) More...
 
void cooling_off_timer_callback_ ()
 
void cooling_on_timer_callback_ ()
 
void fan_mode_timer_callback_ ()
 
void fanning_off_timer_callback_ ()
 
void fanning_on_timer_callback_ ()
 
void heating_max_run_time_timer_callback_ ()
 
void heating_off_timer_callback_ ()
 
void heating_on_timer_callback_ ()
 
void idle_on_timer_callback_ ()
 
bool cooling_required_ ()
 Check if cooling/fanning/heating actions are required; returns true if so. More...
 
bool fanning_required_ ()
 
bool heating_required_ ()
 
bool supplemental_cooling_required_ ()
 
bool supplemental_heating_required_ ()
 
- Protected Member Functions inherited from esphome::climate::Climate
bool set_fan_mode_ (ClimateFanMode mode)
 Set fan mode. Reset custom fan mode. Return true if fan mode has been changed. More...
 
bool set_custom_fan_mode_ (const std::string &mode)
 Set custom fan mode. Reset primary fan mode. Return true if fan mode has been changed. More...
 
bool set_preset_ (ClimatePreset preset)
 Set preset. Reset custom preset. Return true if preset has been changed. More...
 
bool set_custom_preset_ (const std::string &preset)
 Set custom preset. Reset primary preset. Return true if preset has been changed. More...
 
optional< ClimateDeviceRestoreStaterestore_state_ ()
 Restore the state of the climate device, call this from your setup() method. More...
 
void save_state_ ()
 Internal method to save the state of the climate device to recover memory. More...
 
uint32_t hash_base () override
 
void dump_traits_ (const char *tag)
 
- Protected Member Functions inherited from esphome::EntityBase
void calc_object_id_ ()
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_setup ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 

Protected Attributes

sensor::Sensorsensor_ {nullptr}
 The sensor used for getting the current temperature. More...
 
bool supports_auto_ {false}
 Whether the controller supports auto/cooling/drying/fanning/heating. More...
 
bool supports_heat_cool_ {false}
 
bool supports_cool_ {false}
 
bool supports_dry_ {false}
 
bool supports_fan_only_ {false}
 
bool supports_heat_ {false}
 
bool supports_fan_only_action_uses_fan_mode_timer_ {false}
 Special flag – enables fan_modes to share timer with fan_only climate action. More...
 
bool supports_fan_only_cooling_ {false}
 Special flag – enables fan to be switched based on target_temperature_high. More...
 
bool supports_fan_with_cooling_ {false}
 Special flags – enables fan_only action to be called with cooling/heating actions. More...
 
bool supports_fan_with_heating_ {false}
 
bool supports_fan_mode_on_ {false}
 Whether the controller supports turning on or off just the fan. More...
 
bool supports_fan_mode_off_ {false}
 
bool supports_fan_mode_auto_ {false}
 Whether the controller supports fan auto mode. More...
 
bool supports_fan_mode_low_ {false}
 Whether the controller supports various fan speeds and/or positions. More...
 
bool supports_fan_mode_medium_ {false}
 
bool supports_fan_mode_high_ {false}
 
bool supports_fan_mode_middle_ {false}
 
bool supports_fan_mode_focus_ {false}
 
bool supports_fan_mode_diffuse_ {false}
 
bool supports_swing_mode_both_ {false}
 Whether the controller supports various swing modes. More...
 
bool supports_swing_mode_off_ {false}
 
bool supports_swing_mode_horizontal_ {false}
 
bool supports_swing_mode_vertical_ {false}
 
bool supports_two_points_ {false}
 Whether the controller supports two set points. More...
 
bool supports_away_ {false}
 Whether the controller supports an "away" mode. More...
 
bool cooling_max_runtime_exceeded_ {false}
 Flags indicating if maximum allowable run time was exceeded. More...
 
bool heating_max_runtime_exceeded_ {false}
 
bool use_startup_delay_ {false}
 Used to start "off" delay timers at boot. More...
 
bool setup_complete_ {false}
 setup_complete_ blocks modifying/resetting the temps immediately after boot More...
 
Triggercool_action_trigger_ {nullptr}
 The trigger to call when the controller should switch to cooling action/mode. More...
 
Triggersupplemental_cool_action_trigger_ {nullptr}
 
Triggercool_mode_trigger_ {nullptr}
 
Triggerdry_action_trigger_ {nullptr}
 The trigger to call when the controller should switch to dry (dehumidification) mode. More...
 
Triggerdry_mode_trigger_ {nullptr}
 
Triggerheat_action_trigger_ {nullptr}
 The trigger to call when the controller should switch to heating action/mode. More...
 
Triggersupplemental_heat_action_trigger_ {nullptr}
 
Triggerheat_mode_trigger_ {nullptr}
 
Triggerauto_mode_trigger_ {nullptr}
 The trigger to call when the controller should switch to auto mode. More...
 
Triggeridle_action_trigger_ {nullptr}
 The trigger to call when the controller should switch to idle action/off mode. More...
 
Triggeroff_mode_trigger_ {nullptr}
 
Triggerfan_only_action_trigger_ {nullptr}
 The trigger to call when the controller should switch to fan-only action/mode. More...
 
Triggerfan_only_mode_trigger_ {nullptr}
 
Triggerfan_mode_on_trigger_ {nullptr}
 The trigger to call when the controller should switch on the fan. More...
 
Triggerfan_mode_off_trigger_ {nullptr}
 The trigger to call when the controller should switch off the fan. More...
 
Triggerfan_mode_auto_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "auto" mode. More...
 
Triggerfan_mode_low_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "low" speed. More...
 
Triggerfan_mode_medium_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "medium" speed. More...
 
Triggerfan_mode_high_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "high" speed. More...
 
Triggerfan_mode_middle_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "middle" position. More...
 
Triggerfan_mode_focus_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "focus" position. More...
 
Triggerfan_mode_diffuse_trigger_ {nullptr}
 The trigger to call when the controller should switch the fan to "diffuse" position. More...
 
Triggerswing_mode_both_trigger_ {nullptr}
 The trigger to call when the controller should switch the swing mode to "both". More...
 
Triggerswing_mode_off_trigger_ {nullptr}
 The trigger to call when the controller should switch the swing mode to "off". More...
 
Triggerswing_mode_horizontal_trigger_ {nullptr}
 The trigger to call when the controller should switch the swing mode to "horizontal". More...
 
Triggerswing_mode_vertical_trigger_ {nullptr}
 The trigger to call when the controller should switch the swing mode to "vertical". More...
 
Triggertemperature_change_trigger_ {nullptr}
 The trigger to call when the target temperature(s) change(es). More...
 
Triggerprev_action_trigger_ {nullptr}
 A reference to the trigger that was previously active. More...
 
Triggerprev_fan_mode_trigger_ {nullptr}
 
Triggerprev_mode_trigger_ {nullptr}
 
Triggerprev_swing_mode_trigger_ {nullptr}
 
climate::ClimateAction supplemental_action_ {climate::CLIMATE_ACTION_OFF}
 Store previously-known states. More...
 
climate::ClimateFanMode prev_fan_mode_ {climate::CLIMATE_FAN_ON}
 
climate::ClimateMode default_mode_ {climate::CLIMATE_MODE_OFF}
 
climate::ClimateMode prev_mode_ {climate::CLIMATE_MODE_OFF}
 
climate::ClimateSwingMode prev_swing_mode_ {climate::CLIMATE_SWING_OFF}
 
float prev_target_temperature_ {NAN}
 Store previously-known temperatures. More...
 
float prev_target_temperature_low_ {NAN}
 
float prev_target_temperature_high_ {NAN}
 
float set_point_minimum_differential_ {0}
 Minimum differential required between set points. More...
 
float cooling_deadband_ {0}
 Hysteresis values used for computing climate actions. More...
 
float cooling_overrun_ {0}
 
float heating_deadband_ {0}
 
float heating_overrun_ {0}
 
float supplemental_cool_delta_ {0}
 Maximum allowable temperature deltas before engauging supplemental cooling/heating actions. More...
 
float supplemental_heat_delta_ {0}
 
const uint8_t min_timer_duration_ {1}
 Minimum allowable duration in seconds for action timers. More...
 
ThermostatClimateTargetTempConfig normal_config_ {}
 Temperature data for normal/home and away modes. More...
 
ThermostatClimateTargetTempConfig away_config_ {}
 
std::vector< ThermostatClimateTimertimer_
 Climate action timers. More...
 
- Protected Attributes inherited from esphome::climate::Climate
friend ClimateCall
 
CallbackManager< void()> state_callback_ {}
 
ESPPreferenceObject rtc_
 
optional< float > visual_min_temperature_override_ {}
 
optional< float > visual_max_temperature_override_ {}
 
optional< float > visual_temperature_step_override_ {}
 
- Protected Attributes inherited from esphome::EntityBase
std::string name_
 
std::string object_id_
 
std::string icon_
 
uint32_t object_id_hash_
 
bool internal_ {false}
 
bool disabled_by_default_ {false}
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ = nullptr
 

Additional Inherited Members

- Data Fields inherited from esphome::climate::Climate
ClimateMode mode {CLIMATE_MODE_OFF}
 The active mode of the climate device. More...
 
ClimateAction action {CLIMATE_ACTION_OFF}
 The active state of the climate device. More...
 
float current_temperature {NAN}
 The current temperature of the climate device, as reported from the integration. More...
 
union {
   float   target_temperature
 The target temperature of the climate device. More...
 
   struct {
      float   target_temperature_low
 The minimum target temperature of the climate device, for climate devices with split target temperature. More...
 
      float   target_temperature_high
 The maximum target temperature of the climate device, for climate devices with split target temperature. More...
 
   } 
 
}; 
 
optional< ClimateFanModefan_mode
 The active fan mode of the climate device. More...
 
ClimateSwingMode swing_mode
 The active swing mode of the climate device. More...
 
optional< std::string > custom_fan_mode
 The active custom fan mode of the climate device. More...
 
optional< ClimatePresetpreset
 The active preset of the climate device. More...
 
optional< std::string > custom_preset
 The active custom preset mode of the climate device. More...
 

Detailed Description

Definition at line 46 of file thermostat_climate.h.

Constructor & Destructor Documentation

◆ ThermostatClimate()

esphome::thermostat::ThermostatClimate::ThermostatClimate ( )

Definition at line 930 of file thermostat_climate.cpp.

Member Function Documentation

◆ cancel_timer_()

bool esphome::thermostat::ThermostatClimate::cancel_timer_ ( ThermostatClimateTimerIndex  timer_index)
protected

Definition at line 708 of file thermostat_climate.cpp.

◆ change_away_()

void esphome::thermostat::ThermostatClimate::change_away_ ( bool  away)
protected

Change the away setting, will reset target temperatures to defaults.

Definition at line 904 of file thermostat_climate.cpp.

◆ check_temperature_change_trigger_()

void esphome::thermostat::ThermostatClimate::check_temperature_change_trigger_ ( )
protected

Check if the temperature change trigger should be called.

Definition at line 796 of file thermostat_climate.cpp.

◆ climate_action_change_delayed()

bool esphome::thermostat::ThermostatClimate::climate_action_change_delayed ( )

Returns true if a climate action/fan mode transition is being delayed.

Definition at line 59 of file thermostat_climate.cpp.

◆ compute_action_()

climate::ClimateAction esphome::thermostat::ThermostatClimate::compute_action_ ( bool  ignore_timers = false)
protected

Re-compute the required action of this climate controller.

Definition at line 245 of file thermostat_climate.cpp.

◆ compute_supplemental_action_()

climate::ClimateAction esphome::thermostat::ThermostatClimate::compute_supplemental_action_ ( )
protected

Definition at line 307 of file thermostat_climate.cpp.

◆ control()

void esphome::thermostat::ThermostatClimate::control ( const climate::ClimateCall call)
overrideprotectedvirtual

Override control to change settings of the climate device.

Implements esphome::climate::Climate.

Definition at line 159 of file thermostat_climate.cpp.

◆ cool_deadband()

float esphome::thermostat::ThermostatClimate::cool_deadband ( )

Get current hysteresis values.

Definition at line 44 of file thermostat_climate.cpp.

◆ cool_overrun()

float esphome::thermostat::ThermostatClimate::cool_overrun ( )

Definition at line 45 of file thermostat_climate.cpp.

◆ cooling_action_ready_()

bool esphome::thermostat::ThermostatClimate::cooling_action_ready_ ( )
protected

Definition at line 676 of file thermostat_climate.cpp.

◆ cooling_max_run_time_timer_callback_()

void esphome::thermostat::ThermostatClimate::cooling_max_run_time_timer_callback_ ( )
protected

set_timeout() callbacks for various actions (see above)

Definition at line 725 of file thermostat_climate.cpp.

◆ cooling_off_timer_callback_()

void esphome::thermostat::ThermostatClimate::cooling_off_timer_callback_ ( )
protected

Definition at line 733 of file thermostat_climate.cpp.

◆ cooling_on_timer_callback_()

void esphome::thermostat::ThermostatClimate::cooling_on_timer_callback_ ( )
protected

Definition at line 740 of file thermostat_climate.cpp.

◆ cooling_required_()

bool esphome::thermostat::ThermostatClimate::cooling_required_ ( )
protected

Check if cooling/fanning/heating actions are required; returns true if so.

Definition at line 821 of file thermostat_climate.cpp.

◆ delayed_climate_action()

climate::ClimateAction esphome::thermostat::ThermostatClimate::delayed_climate_action ( )

Returns the climate action that is being delayed (check climate_action_change_delayed(), first!)

Definition at line 85 of file thermostat_climate.cpp.

◆ drying_action_ready_()

bool esphome::thermostat::ThermostatClimate::drying_action_ready_ ( )
protected

Definition at line 681 of file thermostat_climate.cpp.

◆ dump_config()

void esphome::thermostat::ThermostatClimate::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 1107 of file thermostat_climate.cpp.

◆ fan_mode_change_delayed()

bool esphome::thermostat::ThermostatClimate::fan_mode_change_delayed ( )

Definition at line 80 of file thermostat_climate.cpp.

◆ fan_mode_ready_()

bool esphome::thermostat::ThermostatClimate::fan_mode_ready_ ( )
protected

Definition at line 686 of file thermostat_climate.cpp.

◆ fan_mode_timer_callback_()

void esphome::thermostat::ThermostatClimate::fan_mode_timer_callback_ ( )
protected

Definition at line 747 of file thermostat_climate.cpp.

◆ fanning_action_ready_()

bool esphome::thermostat::ThermostatClimate::fanning_action_ready_ ( )
protected

Definition at line 688 of file thermostat_climate.cpp.

◆ fanning_off_timer_callback_()

void esphome::thermostat::ThermostatClimate::fanning_off_timer_callback_ ( )
protected

Definition at line 755 of file thermostat_climate.cpp.

◆ fanning_on_timer_callback_()

void esphome::thermostat::ThermostatClimate::fanning_on_timer_callback_ ( )
protected

Definition at line 761 of file thermostat_climate.cpp.

◆ fanning_required_()

bool esphome::thermostat::ThermostatClimate::fanning_required_ ( )
protected

Definition at line 841 of file thermostat_climate.cpp.

◆ get_auto_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_auto_mode_trigger ( ) const

Definition at line 1086 of file thermostat_climate.cpp.

◆ get_cool_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_cool_action_trigger ( ) const

Definition at line 1075 of file thermostat_climate.cpp.

◆ get_cool_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_cool_mode_trigger ( ) const

Definition at line 1087 of file thermostat_climate.cpp.

◆ get_dry_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_dry_action_trigger ( ) const

Definition at line 1079 of file thermostat_climate.cpp.

◆ get_dry_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_dry_mode_trigger ( ) const

Definition at line 1088 of file thermostat_climate.cpp.

◆ get_fan_mode_auto_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_auto_trigger ( ) const

Definition at line 1094 of file thermostat_climate.cpp.

◆ get_fan_mode_diffuse_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_diffuse_trigger ( ) const

Definition at line 1100 of file thermostat_climate.cpp.

◆ get_fan_mode_focus_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_focus_trigger ( ) const

Definition at line 1099 of file thermostat_climate.cpp.

◆ get_fan_mode_high_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_high_trigger ( ) const

Definition at line 1097 of file thermostat_climate.cpp.

◆ get_fan_mode_low_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_low_trigger ( ) const

Definition at line 1095 of file thermostat_climate.cpp.

◆ get_fan_mode_medium_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_medium_trigger ( ) const

Definition at line 1096 of file thermostat_climate.cpp.

◆ get_fan_mode_middle_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_middle_trigger ( ) const

Definition at line 1098 of file thermostat_climate.cpp.

◆ get_fan_mode_off_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_off_trigger ( ) const

Definition at line 1093 of file thermostat_climate.cpp.

◆ get_fan_mode_on_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_mode_on_trigger ( ) const

Definition at line 1092 of file thermostat_climate.cpp.

◆ get_fan_only_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_only_action_trigger ( ) const

Definition at line 1080 of file thermostat_climate.cpp.

◆ get_fan_only_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_fan_only_mode_trigger ( ) const

Definition at line 1089 of file thermostat_climate.cpp.

◆ get_heat_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_heat_action_trigger ( ) const

Definition at line 1081 of file thermostat_climate.cpp.

◆ get_heat_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_heat_mode_trigger ( ) const

Definition at line 1090 of file thermostat_climate.cpp.

◆ get_idle_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_idle_action_trigger ( ) const

Definition at line 1085 of file thermostat_climate.cpp.

◆ get_off_mode_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_off_mode_trigger ( ) const

Definition at line 1091 of file thermostat_climate.cpp.

◆ get_supplemental_cool_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_supplemental_cool_action_trigger ( ) const

Definition at line 1076 of file thermostat_climate.cpp.

◆ get_supplemental_heat_action_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_supplemental_heat_action_trigger ( ) const

Definition at line 1082 of file thermostat_climate.cpp.

◆ get_swing_mode_both_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_swing_mode_both_trigger ( ) const

Definition at line 1101 of file thermostat_climate.cpp.

◆ get_swing_mode_horizontal_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_swing_mode_horizontal_trigger ( ) const

Definition at line 1103 of file thermostat_climate.cpp.

◆ get_swing_mode_off_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_swing_mode_off_trigger ( ) const

Definition at line 1102 of file thermostat_climate.cpp.

◆ get_swing_mode_vertical_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_swing_mode_vertical_trigger ( ) const

Definition at line 1104 of file thermostat_climate.cpp.

◆ get_temperature_change_trigger()

Trigger * esphome::thermostat::ThermostatClimate::get_temperature_change_trigger ( ) const

Definition at line 1105 of file thermostat_climate.cpp.

◆ heat_deadband()

float esphome::thermostat::ThermostatClimate::heat_deadband ( )

Definition at line 46 of file thermostat_climate.cpp.

◆ heat_overrun()

float esphome::thermostat::ThermostatClimate::heat_overrun ( )

Definition at line 47 of file thermostat_climate.cpp.

◆ heating_action_ready_()

bool esphome::thermostat::ThermostatClimate::heating_action_ready_ ( )
protected

Definition at line 695 of file thermostat_climate.cpp.

◆ heating_max_run_time_timer_callback_()

void esphome::thermostat::ThermostatClimate::heating_max_run_time_timer_callback_ ( )
protected

Definition at line 767 of file thermostat_climate.cpp.

◆ heating_off_timer_callback_()

void esphome::thermostat::ThermostatClimate::heating_off_timer_callback_ ( )
protected

Definition at line 775 of file thermostat_climate.cpp.

◆ heating_on_timer_callback_()

void esphome::thermostat::ThermostatClimate::heating_on_timer_callback_ ( )
protected

Definition at line 782 of file thermostat_climate.cpp.

◆ heating_required_()

bool esphome::thermostat::ThermostatClimate::heating_required_ ( )
protected

Definition at line 864 of file thermostat_climate.cpp.

◆ hysteresis_valid()

bool esphome::thermostat::ThermostatClimate::hysteresis_valid ( )

Set point and hysteresis validation.

Definition at line 89 of file thermostat_climate.cpp.

◆ idle_action_ready_()

bool esphome::thermostat::ThermostatClimate::idle_action_ready_ ( )
protected

Is the action ready to be called? Returns true if so.

Definition at line 667 of file thermostat_climate.cpp.

◆ idle_on_timer_callback_()

void esphome::thermostat::ThermostatClimate::idle_on_timer_callback_ ( )
protected

Definition at line 789 of file thermostat_climate.cpp.

◆ locked_fan_mode()

climate::ClimateFanMode esphome::thermostat::ThermostatClimate::locked_fan_mode ( )

Returns the fan mode that is locked in (check fan_mode_change_delayed(), first!)

Definition at line 87 of file thermostat_climate.cpp.

◆ refresh()

void esphome::thermostat::ThermostatClimate::refresh ( )

Call triggers based on updated climate states (modes/actions)

Definition at line 49 of file thermostat_climate.cpp.

◆ set_away_config()

void esphome::thermostat::ThermostatClimate::set_away_config ( const ThermostatClimateTargetTempConfig away_config)

Definition at line 925 of file thermostat_climate.cpp.

◆ set_cool_deadband()

void esphome::thermostat::ThermostatClimate::set_cool_deadband ( float  deadband)

Definition at line 963 of file thermostat_climate.cpp.

◆ set_cool_overrun()

void esphome::thermostat::ThermostatClimate::set_cool_overrun ( float  overrun)

Definition at line 964 of file thermostat_climate.cpp.

◆ set_cooling_maximum_run_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_cooling_maximum_run_time_in_sec ( uint32_t  time)

Definition at line 969 of file thermostat_climate.cpp.

◆ set_cooling_minimum_off_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_cooling_minimum_off_time_in_sec ( uint32_t  time)

Definition at line 973 of file thermostat_climate.cpp.

◆ set_cooling_minimum_run_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_cooling_minimum_run_time_in_sec ( uint32_t  time)

Definition at line 977 of file thermostat_climate.cpp.

◆ set_default_mode()

void esphome::thermostat::ThermostatClimate::set_default_mode ( climate::ClimateMode  default_mode)

Definition at line 959 of file thermostat_climate.cpp.

◆ set_fan_mode_minimum_switching_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_fan_mode_minimum_switching_time_in_sec ( uint32_t  time)

Definition at line 981 of file thermostat_climate.cpp.

◆ set_fanning_minimum_off_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_fanning_minimum_off_time_in_sec ( uint32_t  time)

Definition at line 985 of file thermostat_climate.cpp.

◆ set_fanning_minimum_run_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_fanning_minimum_run_time_in_sec ( uint32_t  time)

Definition at line 989 of file thermostat_climate.cpp.

◆ set_heat_deadband()

void esphome::thermostat::ThermostatClimate::set_heat_deadband ( float  deadband)

Definition at line 965 of file thermostat_climate.cpp.

◆ set_heat_overrun()

void esphome::thermostat::ThermostatClimate::set_heat_overrun ( float  overrun)

Definition at line 966 of file thermostat_climate.cpp.

◆ set_heating_maximum_run_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_heating_maximum_run_time_in_sec ( uint32_t  time)

Definition at line 993 of file thermostat_climate.cpp.

◆ set_heating_minimum_off_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_heating_minimum_off_time_in_sec ( uint32_t  time)

Definition at line 997 of file thermostat_climate.cpp.

◆ set_heating_minimum_run_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_heating_minimum_run_time_in_sec ( uint32_t  time)

Definition at line 1001 of file thermostat_climate.cpp.

◆ set_idle_minimum_time_in_sec()

void esphome::thermostat::ThermostatClimate::set_idle_minimum_time_in_sec ( uint32_t  time)

Definition at line 1005 of file thermostat_climate.cpp.

◆ set_normal_config()

void esphome::thermostat::ThermostatClimate::set_normal_config ( const ThermostatClimateTargetTempConfig normal_config)

Definition at line 921 of file thermostat_climate.cpp.

◆ set_sensor()

void esphome::thermostat::ThermostatClimate::set_sensor ( sensor::Sensor sensor)

Definition at line 1009 of file thermostat_climate.cpp.

◆ set_set_point_minimum_differential()

void esphome::thermostat::ThermostatClimate::set_set_point_minimum_differential ( float  differential)

Definition at line 960 of file thermostat_climate.cpp.

◆ set_supplemental_cool_delta()

void esphome::thermostat::ThermostatClimate::set_supplemental_cool_delta ( float  delta)

Definition at line 967 of file thermostat_climate.cpp.

◆ set_supplemental_heat_delta()

void esphome::thermostat::ThermostatClimate::set_supplemental_heat_delta ( float  delta)

Definition at line 968 of file thermostat_climate.cpp.

◆ set_supports_auto()

void esphome::thermostat::ThermostatClimate::set_supports_auto ( bool  supports_auto)

Definition at line 1014 of file thermostat_climate.cpp.

◆ set_supports_cool()

void esphome::thermostat::ThermostatClimate::set_supports_cool ( bool  supports_cool)

Definition at line 1015 of file thermostat_climate.cpp.

◆ set_supports_dry()

void esphome::thermostat::ThermostatClimate::set_supports_dry ( bool  supports_dry)

Definition at line 1016 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_auto()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_auto ( bool  supports_fan_mode_auto)

Definition at line 1038 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_diffuse()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_diffuse ( bool  supports_fan_mode_diffuse)

Definition at line 1056 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_focus()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_focus ( bool  supports_fan_mode_focus)

Definition at line 1053 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_high()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_high ( bool  supports_fan_mode_high)

Definition at line 1047 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_low()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_low ( bool  supports_fan_mode_low)

Definition at line 1041 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_medium()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_medium ( bool  supports_fan_mode_medium)

Definition at line 1044 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_middle()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_middle ( bool  supports_fan_mode_middle)

Definition at line 1050 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_off()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_off ( bool  supports_fan_mode_off)

Definition at line 1035 of file thermostat_climate.cpp.

◆ set_supports_fan_mode_on()

void esphome::thermostat::ThermostatClimate::set_supports_fan_mode_on ( bool  supports_fan_mode_on)

Definition at line 1032 of file thermostat_climate.cpp.

◆ set_supports_fan_only()

void esphome::thermostat::ThermostatClimate::set_supports_fan_only ( bool  supports_fan_only)

Definition at line 1017 of file thermostat_climate.cpp.

◆ set_supports_fan_only_action_uses_fan_mode_timer()

void esphome::thermostat::ThermostatClimate::set_supports_fan_only_action_uses_fan_mode_timer ( bool  fan_only_action_uses_fan_mode_timer)

Definition at line 1018 of file thermostat_climate.cpp.

◆ set_supports_fan_only_cooling()

void esphome::thermostat::ThermostatClimate::set_supports_fan_only_cooling ( bool  supports_fan_only_cooling)

Definition at line 1022 of file thermostat_climate.cpp.

◆ set_supports_fan_with_cooling()

void esphome::thermostat::ThermostatClimate::set_supports_fan_with_cooling ( bool  supports_fan_with_cooling)

Definition at line 1025 of file thermostat_climate.cpp.

◆ set_supports_fan_with_heating()

void esphome::thermostat::ThermostatClimate::set_supports_fan_with_heating ( bool  supports_fan_with_heating)

Definition at line 1028 of file thermostat_climate.cpp.

◆ set_supports_heat()

void esphome::thermostat::ThermostatClimate::set_supports_heat ( bool  supports_heat)

Definition at line 1031 of file thermostat_climate.cpp.

◆ set_supports_heat_cool()

void esphome::thermostat::ThermostatClimate::set_supports_heat_cool ( bool  supports_heat_cool)

Definition at line 1011 of file thermostat_climate.cpp.

◆ set_supports_swing_mode_both()

void esphome::thermostat::ThermostatClimate::set_supports_swing_mode_both ( bool  supports_swing_mode_both)

Definition at line 1059 of file thermostat_climate.cpp.

◆ set_supports_swing_mode_horizontal()

void esphome::thermostat::ThermostatClimate::set_supports_swing_mode_horizontal ( bool  supports_swing_mode_horizontal)

Definition at line 1065 of file thermostat_climate.cpp.

◆ set_supports_swing_mode_off()

void esphome::thermostat::ThermostatClimate::set_supports_swing_mode_off ( bool  supports_swing_mode_off)

Definition at line 1062 of file thermostat_climate.cpp.

◆ set_supports_swing_mode_vertical()

void esphome::thermostat::ThermostatClimate::set_supports_swing_mode_vertical ( bool  supports_swing_mode_vertical)

Definition at line 1068 of file thermostat_climate.cpp.

◆ set_supports_two_points()

void esphome::thermostat::ThermostatClimate::set_supports_two_points ( bool  supports_two_points)

Definition at line 1071 of file thermostat_climate.cpp.

◆ set_use_startup_delay()

void esphome::thermostat::ThermostatClimate::set_use_startup_delay ( bool  use_startup_delay)

Definition at line 1010 of file thermostat_climate.cpp.

◆ setup()

void esphome::thermostat::ThermostatClimate::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 9 of file thermostat_climate.cpp.

◆ start_timer_()

void esphome::thermostat::ThermostatClimate::start_timer_ ( ThermostatClimateTimerIndex  timer_index)
protected

Start/cancel/get status of climate action timer.

Definition at line 700 of file thermostat_climate.cpp.

◆ supplemental_cooling_required_()

bool esphome::thermostat::ThermostatClimate::supplemental_cooling_required_ ( )
protected

Definition at line 884 of file thermostat_climate.cpp.

◆ supplemental_heating_required_()

bool esphome::thermostat::ThermostatClimate::supplemental_heating_required_ ( )
protected

Definition at line 894 of file thermostat_climate.cpp.

◆ switch_to_action_()

void esphome::thermostat::ThermostatClimate::switch_to_action_ ( climate::ClimateAction  action,
bool  publish_state = true 
)
protected

Switch the climate device to the given climate action.

Definition at line 349 of file thermostat_climate.cpp.

◆ switch_to_fan_mode_()

void esphome::thermostat::ThermostatClimate::switch_to_fan_mode_ ( climate::ClimateFanMode  fan_mode,
bool  publish_state = true 
)
protected

Switch the climate device to the given climate fan mode.

Definition at line 516 of file thermostat_climate.cpp.

◆ switch_to_mode_()

void esphome::thermostat::ThermostatClimate::switch_to_mode_ ( climate::ClimateMode  mode,
bool  publish_state = true 
)
protected

Switch the climate device to the given climate mode.

Definition at line 583 of file thermostat_climate.cpp.

◆ switch_to_supplemental_action_()

void esphome::thermostat::ThermostatClimate::switch_to_supplemental_action_ ( climate::ClimateAction  action)
protected

Definition at line 462 of file thermostat_climate.cpp.

◆ switch_to_swing_mode_()

void esphome::thermostat::ThermostatClimate::switch_to_swing_mode_ ( climate::ClimateSwingMode  swing_mode,
bool  publish_state = true 
)
protected

Switch the climate device to the given climate swing mode.

Definition at line 628 of file thermostat_climate.cpp.

◆ timer_active_()

bool esphome::thermostat::ThermostatClimate::timer_active_ ( ThermostatClimateTimerIndex  timer_index)
protected

Definition at line 713 of file thermostat_climate.cpp.

◆ timer_cbf_()

std::function< void()> esphome::thermostat::ThermostatClimate::timer_cbf_ ( ThermostatClimateTimerIndex  timer_index)
protected

Definition at line 721 of file thermostat_climate.cpp.

◆ timer_duration_()

uint32_t esphome::thermostat::ThermostatClimate::timer_duration_ ( ThermostatClimateTimerIndex  timer_index)
protected

Definition at line 717 of file thermostat_climate.cpp.

◆ traits()

climate::ClimateTraits esphome::thermostat::ThermostatClimate::traits ( )
overrideprotectedvirtual

Return the traits of this controller.

Implements esphome::climate::Climate.

Definition at line 193 of file thermostat_climate.cpp.

◆ trigger_supplemental_action_()

void esphome::thermostat::ThermostatClimate::trigger_supplemental_action_ ( )
protected

Definition at line 488 of file thermostat_climate.cpp.

◆ validate_target_temperature()

void esphome::thermostat::ThermostatClimate::validate_target_temperature ( )

Definition at line 100 of file thermostat_climate.cpp.

◆ validate_target_temperature_high()

void esphome::thermostat::ThermostatClimate::validate_target_temperature_high ( )

Definition at line 141 of file thermostat_climate.cpp.

◆ validate_target_temperature_low()

void esphome::thermostat::ThermostatClimate::validate_target_temperature_low ( )

Definition at line 123 of file thermostat_climate.cpp.

◆ validate_target_temperatures()

void esphome::thermostat::ThermostatClimate::validate_target_temperatures ( )

Definition at line 114 of file thermostat_climate.cpp.

Field Documentation

◆ auto_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::auto_mode_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to auto mode.

In auto mode, the controller will enable heating/cooling as necessary and switch to idle when the temperature is within the thresholds/set points.

Definition at line 314 of file thermostat_climate.h.

◆ away_config_

ThermostatClimateTargetTempConfig esphome::thermostat::ThermostatClimate::away_config_ {}
protected

Definition at line 414 of file thermostat_climate.h.

◆ cool_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::cool_action_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to cooling action/mode.

A null value for this attribute means that the controller has no cooling action For example electric heat, where only heating (power on) and not-heating (power off) is possible.

Definition at line 290 of file thermostat_climate.h.

◆ cool_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::cool_mode_trigger_ {nullptr}
protected

Definition at line 292 of file thermostat_climate.h.

◆ cooling_deadband_

float esphome::thermostat::ThermostatClimate::cooling_deadband_ {0}
protected

Hysteresis values used for computing climate actions.

Definition at line 400 of file thermostat_climate.h.

◆ cooling_max_runtime_exceeded_

bool esphome::thermostat::ThermostatClimate::cooling_max_runtime_exceeded_ {false}
protected

Flags indicating if maximum allowable run time was exceeded.

Definition at line 276 of file thermostat_climate.h.

◆ cooling_overrun_

float esphome::thermostat::ThermostatClimate::cooling_overrun_ {0}
protected

Definition at line 401 of file thermostat_climate.h.

◆ default_mode_

climate::ClimateMode esphome::thermostat::ThermostatClimate::default_mode_ {climate::CLIMATE_MODE_OFF}
protected

Definition at line 385 of file thermostat_climate.h.

◆ dry_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::dry_action_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to dry (dehumidification) mode.

In dry mode, the controller is assumed to have both heating and cooling disabled, although the system may use its cooling mechanism to achieve drying.

Definition at line 298 of file thermostat_climate.h.

◆ dry_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::dry_mode_trigger_ {nullptr}
protected

Definition at line 299 of file thermostat_climate.h.

◆ fan_mode_auto_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_auto_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "auto" mode.

Definition at line 336 of file thermostat_climate.h.

◆ fan_mode_diffuse_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_diffuse_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "diffuse" position.

Definition at line 354 of file thermostat_climate.h.

◆ fan_mode_focus_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_focus_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "focus" position.

Definition at line 351 of file thermostat_climate.h.

◆ fan_mode_high_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_high_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "high" speed.

Definition at line 345 of file thermostat_climate.h.

◆ fan_mode_low_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_low_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "low" speed.

Definition at line 339 of file thermostat_climate.h.

◆ fan_mode_medium_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_medium_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "medium" speed.

Definition at line 342 of file thermostat_climate.h.

◆ fan_mode_middle_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_middle_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the fan to "middle" position.

Definition at line 348 of file thermostat_climate.h.

◆ fan_mode_off_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_off_trigger_ {nullptr}
protected

The trigger to call when the controller should switch off the fan.

Definition at line 333 of file thermostat_climate.h.

◆ fan_mode_on_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_mode_on_trigger_ {nullptr}
protected

The trigger to call when the controller should switch on the fan.

Definition at line 330 of file thermostat_climate.h.

◆ fan_only_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_only_action_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to fan-only action/mode.

In fan-only mode, the controller is assumed to have both heating and cooling disabled. The system should activate the fan only.

Definition at line 326 of file thermostat_climate.h.

◆ fan_only_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::fan_only_mode_trigger_ {nullptr}
protected

Definition at line 327 of file thermostat_climate.h.

◆ heat_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::heat_action_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to heating action/mode.

A null value for this attribute means that the controller has no heating action For example window blinds, where only cooling (blinds closed) and not-cooling (blinds open) is possible.

Definition at line 306 of file thermostat_climate.h.

◆ heat_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::heat_mode_trigger_ {nullptr}
protected

Definition at line 308 of file thermostat_climate.h.

◆ heating_deadband_

float esphome::thermostat::ThermostatClimate::heating_deadband_ {0}
protected

Definition at line 402 of file thermostat_climate.h.

◆ heating_max_runtime_exceeded_

bool esphome::thermostat::ThermostatClimate::heating_max_runtime_exceeded_ {false}
protected

Definition at line 277 of file thermostat_climate.h.

◆ heating_overrun_

float esphome::thermostat::ThermostatClimate::heating_overrun_ {0}
protected

Definition at line 403 of file thermostat_climate.h.

◆ idle_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::idle_action_trigger_ {nullptr}
protected

The trigger to call when the controller should switch to idle action/off mode.

In these actions/modes, the controller is assumed to have both heating and cooling disabled.

Definition at line 319 of file thermostat_climate.h.

◆ min_timer_duration_

const uint8_t esphome::thermostat::ThermostatClimate::min_timer_duration_ {1}
protected

Minimum allowable duration in seconds for action timers.

Definition at line 410 of file thermostat_climate.h.

◆ normal_config_

ThermostatClimateTargetTempConfig esphome::thermostat::ThermostatClimate::normal_config_ {}
protected

Temperature data for normal/home and away modes.

Definition at line 413 of file thermostat_climate.h.

◆ off_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::off_mode_trigger_ {nullptr}
protected

Definition at line 320 of file thermostat_climate.h.

◆ prev_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::prev_action_trigger_ {nullptr}
protected

A reference to the trigger that was previously active.

This is so that the previous trigger can be stopped before enabling a new one for each climate category (mode, action, fan_mode, swing_mode).

Definition at line 375 of file thermostat_climate.h.

◆ prev_fan_mode_

climate::ClimateFanMode esphome::thermostat::ThermostatClimate::prev_fan_mode_ {climate::CLIMATE_FAN_ON}
protected

Definition at line 384 of file thermostat_climate.h.

◆ prev_fan_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::prev_fan_mode_trigger_ {nullptr}
protected

Definition at line 376 of file thermostat_climate.h.

◆ prev_mode_

climate::ClimateMode esphome::thermostat::ThermostatClimate::prev_mode_ {climate::CLIMATE_MODE_OFF}
protected

Definition at line 386 of file thermostat_climate.h.

◆ prev_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::prev_mode_trigger_ {nullptr}
protected

Definition at line 377 of file thermostat_climate.h.

◆ prev_swing_mode_

climate::ClimateSwingMode esphome::thermostat::ThermostatClimate::prev_swing_mode_ {climate::CLIMATE_SWING_OFF}
protected

Definition at line 387 of file thermostat_climate.h.

◆ prev_swing_mode_trigger_

Trigger* esphome::thermostat::ThermostatClimate::prev_swing_mode_trigger_ {nullptr}
protected

Definition at line 378 of file thermostat_climate.h.

◆ prev_target_temperature_

float esphome::thermostat::ThermostatClimate::prev_target_temperature_ {NAN}
protected

Store previously-known temperatures.

These are used to determine when the temperature change trigger/action needs to be called

Definition at line 392 of file thermostat_climate.h.

◆ prev_target_temperature_high_

float esphome::thermostat::ThermostatClimate::prev_target_temperature_high_ {NAN}
protected

Definition at line 394 of file thermostat_climate.h.

◆ prev_target_temperature_low_

float esphome::thermostat::ThermostatClimate::prev_target_temperature_low_ {NAN}
protected

Definition at line 393 of file thermostat_climate.h.

◆ sensor_

sensor::Sensor* esphome::thermostat::ThermostatClimate::sensor_ {nullptr}
protected

The sensor used for getting the current temperature.

Definition at line 214 of file thermostat_climate.h.

◆ set_point_minimum_differential_

float esphome::thermostat::ThermostatClimate::set_point_minimum_differential_ {0}
protected

Minimum differential required between set points.

Definition at line 397 of file thermostat_climate.h.

◆ setup_complete_

bool esphome::thermostat::ThermostatClimate::setup_complete_ {false}
protected

setup_complete_ blocks modifying/resetting the temps immediately after boot

Definition at line 283 of file thermostat_climate.h.

◆ supplemental_action_

climate::ClimateAction esphome::thermostat::ThermostatClimate::supplemental_action_ {climate::CLIMATE_ACTION_OFF}
protected

Store previously-known states.

These are used to determine when a trigger/action needs to be called

Definition at line 383 of file thermostat_climate.h.

◆ supplemental_cool_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::supplemental_cool_action_trigger_ {nullptr}
protected

Definition at line 291 of file thermostat_climate.h.

◆ supplemental_cool_delta_

float esphome::thermostat::ThermostatClimate::supplemental_cool_delta_ {0}
protected

Maximum allowable temperature deltas before engauging supplemental cooling/heating actions.

Definition at line 406 of file thermostat_climate.h.

◆ supplemental_heat_action_trigger_

Trigger* esphome::thermostat::ThermostatClimate::supplemental_heat_action_trigger_ {nullptr}
protected

Definition at line 307 of file thermostat_climate.h.

◆ supplemental_heat_delta_

float esphome::thermostat::ThermostatClimate::supplemental_heat_delta_ {0}
protected

Definition at line 407 of file thermostat_climate.h.

◆ supports_auto_

bool esphome::thermostat::ThermostatClimate::supports_auto_ {false}
protected

Whether the controller supports auto/cooling/drying/fanning/heating.

A false value for any given attribute means that the controller has no such action (for example a thermostat, where only heating and not-heating is possible).

Definition at line 220 of file thermostat_climate.h.

◆ supports_away_

bool esphome::thermostat::ThermostatClimate::supports_away_ {false}
protected

Whether the controller supports an "away" mode.

A false value means that the controller has no such mode.

Definition at line 273 of file thermostat_climate.h.

◆ supports_cool_

bool esphome::thermostat::ThermostatClimate::supports_cool_ {false}
protected

Definition at line 222 of file thermostat_climate.h.

◆ supports_dry_

bool esphome::thermostat::ThermostatClimate::supports_dry_ {false}
protected

Definition at line 223 of file thermostat_climate.h.

◆ supports_fan_mode_auto_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_auto_ {false}
protected

Whether the controller supports fan auto mode.

A false value for this attribute means that the controller has no fan-auto action (for example a thermostat, where independent control of the fan is not possible).

Definition at line 245 of file thermostat_climate.h.

◆ supports_fan_mode_diffuse_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_diffuse_ {false}
protected

Definition at line 255 of file thermostat_climate.h.

◆ supports_fan_mode_focus_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_focus_ {false}
protected

Definition at line 254 of file thermostat_climate.h.

◆ supports_fan_mode_high_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_high_ {false}
protected

Definition at line 252 of file thermostat_climate.h.

◆ supports_fan_mode_low_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_low_ {false}
protected

Whether the controller supports various fan speeds and/or positions.

A false value for any given attribute means that the controller has no such fan action.

Definition at line 250 of file thermostat_climate.h.

◆ supports_fan_mode_medium_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_medium_ {false}
protected

Definition at line 251 of file thermostat_climate.h.

◆ supports_fan_mode_middle_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_middle_ {false}
protected

Definition at line 253 of file thermostat_climate.h.

◆ supports_fan_mode_off_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_off_ {false}
protected

Definition at line 239 of file thermostat_climate.h.

◆ supports_fan_mode_on_

bool esphome::thermostat::ThermostatClimate::supports_fan_mode_on_ {false}
protected

Whether the controller supports turning on or off just the fan.

A false value for either attribute means that the controller has no fan on/off action (for example a thermostat, where independent control of the fan is not possible).

Definition at line 238 of file thermostat_climate.h.

◆ supports_fan_only_

bool esphome::thermostat::ThermostatClimate::supports_fan_only_ {false}
protected

Definition at line 224 of file thermostat_climate.h.

◆ supports_fan_only_action_uses_fan_mode_timer_

bool esphome::thermostat::ThermostatClimate::supports_fan_only_action_uses_fan_mode_timer_ {false}
protected

Special flag – enables fan_modes to share timer with fan_only climate action.

Definition at line 227 of file thermostat_climate.h.

◆ supports_fan_only_cooling_

bool esphome::thermostat::ThermostatClimate::supports_fan_only_cooling_ {false}
protected

Special flag – enables fan to be switched based on target_temperature_high.

Definition at line 229 of file thermostat_climate.h.

◆ supports_fan_with_cooling_

bool esphome::thermostat::ThermostatClimate::supports_fan_with_cooling_ {false}
protected

Special flags – enables fan_only action to be called with cooling/heating actions.

Definition at line 231 of file thermostat_climate.h.

◆ supports_fan_with_heating_

bool esphome::thermostat::ThermostatClimate::supports_fan_with_heating_ {false}
protected

Definition at line 232 of file thermostat_climate.h.

◆ supports_heat_

bool esphome::thermostat::ThermostatClimate::supports_heat_ {false}
protected

Definition at line 225 of file thermostat_climate.h.

◆ supports_heat_cool_

bool esphome::thermostat::ThermostatClimate::supports_heat_cool_ {false}
protected

Definition at line 221 of file thermostat_climate.h.

◆ supports_swing_mode_both_

bool esphome::thermostat::ThermostatClimate::supports_swing_mode_both_ {false}
protected

Whether the controller supports various swing modes.

A false value for any given attribute means that the controller has no such swing mode.

Definition at line 260 of file thermostat_climate.h.

◆ supports_swing_mode_horizontal_

bool esphome::thermostat::ThermostatClimate::supports_swing_mode_horizontal_ {false}
protected

Definition at line 262 of file thermostat_climate.h.

◆ supports_swing_mode_off_

bool esphome::thermostat::ThermostatClimate::supports_swing_mode_off_ {false}
protected

Definition at line 261 of file thermostat_climate.h.

◆ supports_swing_mode_vertical_

bool esphome::thermostat::ThermostatClimate::supports_swing_mode_vertical_ {false}
protected

Definition at line 263 of file thermostat_climate.h.

◆ supports_two_points_

bool esphome::thermostat::ThermostatClimate::supports_two_points_ {false}
protected

Whether the controller supports two set points.

A false value means that the controller has no such support.

Definition at line 268 of file thermostat_climate.h.

◆ swing_mode_both_trigger_

Trigger* esphome::thermostat::ThermostatClimate::swing_mode_both_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the swing mode to "both".

Definition at line 357 of file thermostat_climate.h.

◆ swing_mode_horizontal_trigger_

Trigger* esphome::thermostat::ThermostatClimate::swing_mode_horizontal_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the swing mode to "horizontal".

Definition at line 363 of file thermostat_climate.h.

◆ swing_mode_off_trigger_

Trigger* esphome::thermostat::ThermostatClimate::swing_mode_off_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the swing mode to "off".

Definition at line 360 of file thermostat_climate.h.

◆ swing_mode_vertical_trigger_

Trigger* esphome::thermostat::ThermostatClimate::swing_mode_vertical_trigger_ {nullptr}
protected

The trigger to call when the controller should switch the swing mode to "vertical".

Definition at line 366 of file thermostat_climate.h.

◆ temperature_change_trigger_

Trigger* esphome::thermostat::ThermostatClimate::temperature_change_trigger_ {nullptr}
protected

The trigger to call when the target temperature(s) change(es).

Definition at line 369 of file thermostat_climate.h.

◆ timer_

std::vector<ThermostatClimateTimer> esphome::thermostat::ThermostatClimate::timer_
protected
Initial value:
{
{"cool_run", false, 0, std::bind(&ThermostatClimate::cooling_max_run_time_timer_callback_, this)},
{"cool_off", false, 0, std::bind(&ThermostatClimate::cooling_off_timer_callback_, this)},
{"cool_on", false, 0, std::bind(&ThermostatClimate::cooling_on_timer_callback_, this)},
{"fan_mode", false, 0, std::bind(&ThermostatClimate::fan_mode_timer_callback_, this)},
{"fan_off", false, 0, std::bind(&ThermostatClimate::fanning_off_timer_callback_, this)},
{"fan_on", false, 0, std::bind(&ThermostatClimate::fanning_on_timer_callback_, this)},
{"heat_run", false, 0, std::bind(&ThermostatClimate::heating_max_run_time_timer_callback_, this)},
{"heat_off", false, 0, std::bind(&ThermostatClimate::heating_off_timer_callback_, this)},
{"heat_on", false, 0, std::bind(&ThermostatClimate::heating_on_timer_callback_, this)},
{"idle_on", false, 0, std::bind(&ThermostatClimate::idle_on_timer_callback_, this)}}

Climate action timers.

Definition at line 417 of file thermostat_climate.h.

◆ use_startup_delay_

bool esphome::thermostat::ThermostatClimate::use_startup_delay_ {false}
protected

Used to start "off" delay timers at boot.

Definition at line 280 of file thermostat_climate.h.


The documentation for this class was generated from the following files: