ESPHome  2022.6.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_preset_config (climate::ClimatePreset preset, const ThermostatClimateTargetTempConfig &config)
 
void set_custom_preset_config (const std::string &name, const ThermostatClimateTargetTempConfig &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
 
Triggerget_preset_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)
 
EntityCategory get_entity_category () const
 
void set_entity_category (EntityCategory entity_category)
 
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_preset_ (climate::ClimatePreset preset)
 Change to a provided preset setting; will reset temperature, mode, fan, and swing modes accordingly. More...
 
void change_custom_preset_ (const std::string &custom_preset)
 Change to a provided custom preset setting; will reset temperature, mode, fan, and swing modes accordingly. More...
 
void change_preset_internal_ (const ThermostatClimateTargetTempConfig &config)
 Applies the temperature, mode, fan, and swing modes of the provded config. 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_ ()
 
void dump_preset_config_ (const std::string &preset_name, const ThermostatClimateTargetTempConfig &config)
 
- 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...
 
void dump_traits_ (const char *tag)
 
- Protected Member Functions inherited from esphome::EntityBase
virtual uint32_t hash_base ()
 The hash_base() function has been deprecated. More...
 
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_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name. More...
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function. More...
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
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 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...
 
Triggerpreset_change_trigger_ {nullptr}
 The triggr to call when the preset mode changes. 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...
 
std::vector< ThermostatClimateTimertimer_
 Climate action timers. More...
 
std::map< climate::ClimatePreset, ThermostatClimateTargetTempConfigpreset_config_ {}
 The set of standard preset configurations this thermostat supports (Eg. AWAY, ECO, etc) More...
 
std::map< std::string, ThermostatClimateTargetTempConfigcustom_preset_config_ {}
 The set of custom preset configurations this thermostat supports (eg. "My Custom Preset") 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}
 
EntityCategory entity_category_ {ENTITY_CATEGORY_NONE}
 
- 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 54 of file thermostat_climate.h.

Constructor & Destructor Documentation

◆ ThermostatClimate()

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

Definition at line 1034 of file thermostat_climate.cpp.

Member Function Documentation

◆ cancel_timer_()

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

Definition at line 730 of file thermostat_climate.cpp.

◆ change_custom_preset_()

void esphome::thermostat::ThermostatClimate::change_custom_preset_ ( const std::string &  custom_preset)
protected

Change to a provided custom preset setting; will reset temperature, mode, fan, and swing modes accordingly.

Definition at line 975 of file thermostat_climate.cpp.

◆ change_preset_()

void esphome::thermostat::ThermostatClimate::change_preset_ ( climate::ClimatePreset  preset)
protected

Change to a provided preset setting; will reset temperature, mode, fan, and swing modes accordingly.

Definition at line 961 of file thermostat_climate.cpp.

◆ change_preset_internal_()

void esphome::thermostat::ThermostatClimate::change_preset_internal_ ( const ThermostatClimateTargetTempConfig config)
protected

Applies the temperature, mode, fan, and swing modes of the provded config.

This is agnostic of custom vs built in preset

Definition at line 989 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 818 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 260 of file thermostat_climate.cpp.

◆ compute_supplemental_action_()

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

Definition at line 322 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 161 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 698 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 747 of file thermostat_climate.cpp.

◆ cooling_off_timer_callback_()

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

Definition at line 755 of file thermostat_climate.cpp.

◆ cooling_on_timer_callback_()

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

Definition at line 762 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 843 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 703 of file thermostat_climate.cpp.

◆ dump_config()

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

Reimplemented from esphome::Component.

Definition at line 1213 of file thermostat_climate.cpp.

◆ dump_preset_config_()

void esphome::thermostat::ThermostatClimate::dump_preset_config_ ( const std::string &  preset_name,
const ThermostatClimateTargetTempConfig config 
)
protected

Definition at line 926 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 708 of file thermostat_climate.cpp.

◆ fan_mode_timer_callback_()

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

Definition at line 769 of file thermostat_climate.cpp.

◆ fanning_action_ready_()

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

Definition at line 710 of file thermostat_climate.cpp.

◆ fanning_off_timer_callback_()

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

Definition at line 777 of file thermostat_climate.cpp.

◆ fanning_on_timer_callback_()

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

Definition at line 783 of file thermostat_climate.cpp.

◆ fanning_required_()

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

Definition at line 863 of file thermostat_climate.cpp.

◆ get_auto_mode_trigger()

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

Definition at line 1191 of file thermostat_climate.cpp.

◆ get_cool_action_trigger()

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

Definition at line 1180 of file thermostat_climate.cpp.

◆ get_cool_mode_trigger()

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

Definition at line 1192 of file thermostat_climate.cpp.

◆ get_dry_action_trigger()

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

Definition at line 1184 of file thermostat_climate.cpp.

◆ get_dry_mode_trigger()

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

Definition at line 1193 of file thermostat_climate.cpp.

◆ get_fan_mode_auto_trigger()

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

Definition at line 1199 of file thermostat_climate.cpp.

◆ get_fan_mode_diffuse_trigger()

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

Definition at line 1205 of file thermostat_climate.cpp.

◆ get_fan_mode_focus_trigger()

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

Definition at line 1204 of file thermostat_climate.cpp.

◆ get_fan_mode_high_trigger()

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

Definition at line 1202 of file thermostat_climate.cpp.

◆ get_fan_mode_low_trigger()

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

Definition at line 1200 of file thermostat_climate.cpp.

◆ get_fan_mode_medium_trigger()

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

Definition at line 1201 of file thermostat_climate.cpp.

◆ get_fan_mode_middle_trigger()

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

Definition at line 1203 of file thermostat_climate.cpp.

◆ get_fan_mode_off_trigger()

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

Definition at line 1198 of file thermostat_climate.cpp.

◆ get_fan_mode_on_trigger()

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

Definition at line 1197 of file thermostat_climate.cpp.

◆ get_fan_only_action_trigger()

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

Definition at line 1185 of file thermostat_climate.cpp.

◆ get_fan_only_mode_trigger()

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

Definition at line 1194 of file thermostat_climate.cpp.

◆ get_heat_action_trigger()

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

Definition at line 1186 of file thermostat_climate.cpp.

◆ get_heat_mode_trigger()

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

Definition at line 1195 of file thermostat_climate.cpp.

◆ get_idle_action_trigger()

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

Definition at line 1190 of file thermostat_climate.cpp.

◆ get_off_mode_trigger()

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

Definition at line 1196 of file thermostat_climate.cpp.

◆ get_preset_change_trigger()

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

Definition at line 1211 of file thermostat_climate.cpp.

◆ get_supplemental_cool_action_trigger()

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

Definition at line 1181 of file thermostat_climate.cpp.

◆ get_supplemental_heat_action_trigger()

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

Definition at line 1187 of file thermostat_climate.cpp.

◆ get_swing_mode_both_trigger()

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

Definition at line 1206 of file thermostat_climate.cpp.

◆ get_swing_mode_horizontal_trigger()

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

Definition at line 1208 of file thermostat_climate.cpp.

◆ get_swing_mode_off_trigger()

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

Definition at line 1207 of file thermostat_climate.cpp.

◆ get_swing_mode_vertical_trigger()

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

Definition at line 1209 of file thermostat_climate.cpp.

◆ get_temperature_change_trigger()

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

Definition at line 1210 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 717 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 789 of file thermostat_climate.cpp.

◆ heating_off_timer_callback_()

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

Definition at line 797 of file thermostat_climate.cpp.

◆ heating_on_timer_callback_()

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

Definition at line 804 of file thermostat_climate.cpp.

◆ heating_required_()

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

Definition at line 886 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 689 of file thermostat_climate.cpp.

◆ idle_on_timer_callback_()

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

Definition at line 811 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_cool_deadband()

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

Definition at line 1068 of file thermostat_climate.cpp.

◆ set_cool_overrun()

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

Definition at line 1069 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 1074 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 1078 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 1082 of file thermostat_climate.cpp.

◆ set_custom_preset_config()

void esphome::thermostat::ThermostatClimate::set_custom_preset_config ( const std::string &  name,
const ThermostatClimateTargetTempConfig config 
)

Definition at line 1029 of file thermostat_climate.cpp.

◆ set_default_mode()

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

Definition at line 1064 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 1086 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 1090 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 1094 of file thermostat_climate.cpp.

◆ set_heat_deadband()

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

Definition at line 1070 of file thermostat_climate.cpp.

◆ set_heat_overrun()

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

Definition at line 1071 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 1098 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 1102 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 1106 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 1110 of file thermostat_climate.cpp.

◆ set_preset_config()

void esphome::thermostat::ThermostatClimate::set_preset_config ( climate::ClimatePreset  preset,
const ThermostatClimateTargetTempConfig config 
)

Definition at line 1024 of file thermostat_climate.cpp.

◆ set_sensor()

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

Definition at line 1114 of file thermostat_climate.cpp.

◆ set_set_point_minimum_differential()

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

Definition at line 1065 of file thermostat_climate.cpp.

◆ set_supplemental_cool_delta()

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

Definition at line 1072 of file thermostat_climate.cpp.

◆ set_supplemental_heat_delta()

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

Definition at line 1073 of file thermostat_climate.cpp.

◆ set_supports_auto()

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

Definition at line 1119 of file thermostat_climate.cpp.

◆ set_supports_cool()

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

Definition at line 1120 of file thermostat_climate.cpp.

◆ set_supports_dry()

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

Definition at line 1121 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 1143 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 1161 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 1158 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 1152 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 1146 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 1149 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 1155 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 1140 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 1137 of file thermostat_climate.cpp.

◆ set_supports_fan_only()

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

Definition at line 1122 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 1123 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 1127 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 1130 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 1133 of file thermostat_climate.cpp.

◆ set_supports_heat()

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

Definition at line 1136 of file thermostat_climate.cpp.

◆ set_supports_heat_cool()

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

Definition at line 1116 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 1164 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 1170 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 1167 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 1173 of file thermostat_climate.cpp.

◆ set_supports_two_points()

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

Definition at line 1176 of file thermostat_climate.cpp.

◆ set_use_startup_delay()

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

Definition at line 1115 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 722 of file thermostat_climate.cpp.

◆ supplemental_cooling_required_()

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

Definition at line 906 of file thermostat_climate.cpp.

◆ supplemental_heating_required_()

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

Definition at line 916 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 364 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 535 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 603 of file thermostat_climate.cpp.

◆ switch_to_supplemental_action_()

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

Definition at line 480 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 649 of file thermostat_climate.cpp.

◆ timer_active_()

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

Definition at line 735 of file thermostat_climate.cpp.

◆ timer_cbf_()

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

Definition at line 743 of file thermostat_climate.cpp.

◆ timer_duration_()

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

Definition at line 739 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 204 of file thermostat_climate.cpp.

◆ trigger_supplemental_action_()

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

Definition at line 507 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 142 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 326 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 302 of file thermostat_climate.h.

◆ cool_mode_trigger_

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

Definition at line 304 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 415 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 288 of file thermostat_climate.h.

◆ cooling_overrun_

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

Definition at line 416 of file thermostat_climate.h.

◆ custom_preset_config_

std::map<std::string, ThermostatClimateTargetTempConfig> esphome::thermostat::ThermostatClimate::custom_preset_config_ {}
protected

The set of custom preset configurations this thermostat supports (eg. "My Custom Preset")

Definition at line 443 of file thermostat_climate.h.

◆ default_mode_

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

Definition at line 400 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 310 of file thermostat_climate.h.

◆ dry_mode_trigger_

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

Definition at line 311 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 348 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 366 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 363 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 357 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 351 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 354 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 360 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 345 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 342 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 338 of file thermostat_climate.h.

◆ fan_only_mode_trigger_

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

Definition at line 339 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 318 of file thermostat_climate.h.

◆ heat_mode_trigger_

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

Definition at line 320 of file thermostat_climate.h.

◆ heating_deadband_

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

Definition at line 417 of file thermostat_climate.h.

◆ heating_max_runtime_exceeded_

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

Definition at line 289 of file thermostat_climate.h.

◆ heating_overrun_

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

Definition at line 418 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 331 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 425 of file thermostat_climate.h.

◆ off_mode_trigger_

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

Definition at line 332 of file thermostat_climate.h.

◆ preset_change_trigger_

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

The triggr to call when the preset mode changes.

Definition at line 384 of file thermostat_climate.h.

◆ preset_config_

std::map<climate::ClimatePreset, ThermostatClimateTargetTempConfig> esphome::thermostat::ThermostatClimate::preset_config_ {}
protected

The set of standard preset configurations this thermostat supports (Eg. AWAY, ECO, etc)

Definition at line 441 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 390 of file thermostat_climate.h.

◆ prev_fan_mode_

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

Definition at line 399 of file thermostat_climate.h.

◆ prev_fan_mode_trigger_

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

Definition at line 391 of file thermostat_climate.h.

◆ prev_mode_

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

Definition at line 401 of file thermostat_climate.h.

◆ prev_mode_trigger_

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

Definition at line 392 of file thermostat_climate.h.

◆ prev_swing_mode_

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

Definition at line 402 of file thermostat_climate.h.

◆ prev_swing_mode_trigger_

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

Definition at line 393 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 407 of file thermostat_climate.h.

◆ prev_target_temperature_high_

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

Definition at line 409 of file thermostat_climate.h.

◆ prev_target_temperature_low_

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

Definition at line 408 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 231 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 412 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 295 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 398 of file thermostat_climate.h.

◆ supplemental_cool_action_trigger_

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

Definition at line 303 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 421 of file thermostat_climate.h.

◆ supplemental_heat_action_trigger_

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

Definition at line 319 of file thermostat_climate.h.

◆ supplemental_heat_delta_

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

Definition at line 422 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 237 of file thermostat_climate.h.

◆ supports_cool_

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

Definition at line 239 of file thermostat_climate.h.

◆ supports_dry_

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

Definition at line 240 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 262 of file thermostat_climate.h.

◆ supports_fan_mode_diffuse_

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

Definition at line 272 of file thermostat_climate.h.

◆ supports_fan_mode_focus_

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

Definition at line 271 of file thermostat_climate.h.

◆ supports_fan_mode_high_

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

Definition at line 269 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 267 of file thermostat_climate.h.

◆ supports_fan_mode_medium_

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

Definition at line 268 of file thermostat_climate.h.

◆ supports_fan_mode_middle_

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

Definition at line 270 of file thermostat_climate.h.

◆ supports_fan_mode_off_

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

Definition at line 256 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 255 of file thermostat_climate.h.

◆ supports_fan_only_

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

Definition at line 241 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 244 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 246 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 248 of file thermostat_climate.h.

◆ supports_fan_with_heating_

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

Definition at line 249 of file thermostat_climate.h.

◆ supports_heat_

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

Definition at line 242 of file thermostat_climate.h.

◆ supports_heat_cool_

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

Definition at line 238 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 277 of file thermostat_climate.h.

◆ supports_swing_mode_horizontal_

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

Definition at line 279 of file thermostat_climate.h.

◆ supports_swing_mode_off_

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

Definition at line 278 of file thermostat_climate.h.

◆ supports_swing_mode_vertical_

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

Definition at line 280 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 285 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 369 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 375 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 372 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 378 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 381 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 428 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 292 of file thermostat_climate.h.


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