9static const char *
const TAG =
"thermostat.climate";
41 auto use_default_preset =
true;
46 if (restore.has_value()) {
47 use_default_preset =
false;
48 restore->to_call(
this).perform();
53 if (use_default_preset) {
56 }
else if (this->default_custom_preset_ !=
nullptr) {
71 auto &timer = this->
timer_[i];
72 if (timer.active && (now - timer.started >= timer.time)) {
149 this->
get_traits().get_visual_max_temperature());
156 }
else if (pin_target_temperature_high) {
171 float target_temperature_low_upper_limit =
174 this->
get_traits().get_visual_min_temperature(), this->
get_traits().get_visual_max_temperature())
177 target_temperature_low_upper_limit);
185 float target_temperature_high_lower_limit =
188 this->
get_traits().get_visual_min_temperature(), this->
get_traits().get_visual_max_temperature())
191 this->
get_traits().get_visual_max_temperature());
201 this->
get_traits().get_visual_max_humidity());
206 bool target_temperature_high_changed =
false;
228 if (
mode.has_value()) {
240 auto target_temp_low =
call.get_target_temperature_low();
241 if (target_temp_low.has_value()) {
244 auto target_temp_high =
call.get_target_temperature_high();
245 if (target_temp_high.has_value()) {
253 auto target_temp =
call.get_target_temperature();
254 if (target_temp.has_value()) {
351 switch (this->
mode) {
410 return target_action;
423 switch (this->
mode) {
452 return target_action;
474 return target_action;
495 bool action_ready =
false;
518 ESP_LOGVV(TAG,
"Switching to IDLE/OFF action");
534 ESP_LOGVV(TAG,
"Switching to COOLING action");
548 ESP_LOGVV(TAG,
"Switching to HEATING action");
560 ESP_LOGVV(TAG,
"Switching to FAN_ONLY action");
569 ESP_LOGVV(TAG,
"Switching to DRYING action");
589 if (trig_fan !=
nullptr) {
590 ESP_LOGVV(TAG,
"Calling FAN_ONLY action with HEATING/COOLING action");
620 ESP_LOGVV(TAG,
"Updating supplemental action");
634 ESP_LOGVV(TAG,
"Calling supplemental COOLING action");
641 ESP_LOGVV(TAG,
"Calling supplemental HEATING action");
647 if (trig !=
nullptr) {
663 ESP_LOGVV(TAG,
"Switching to HUMIDIFICATION_OFF action");
667 ESP_LOGVV(TAG,
"Switching to DEHUMIDIFY action");
671 ESP_LOGVV(TAG,
"Switching to HUMIDIFY action");
704 ESP_LOGVV(TAG,
"Switching to FAN_ON mode");
708 ESP_LOGVV(TAG,
"Switching to FAN_OFF mode");
712 ESP_LOGVV(TAG,
"Switching to FAN_AUTO mode");
716 ESP_LOGVV(TAG,
"Switching to FAN_LOW mode");
720 ESP_LOGVV(TAG,
"Switching to FAN_MEDIUM mode");
724 ESP_LOGVV(TAG,
"Switching to FAN_HIGH mode");
728 ESP_LOGVV(TAG,
"Switching to FAN_MIDDLE mode");
732 ESP_LOGVV(TAG,
"Switching to FAN_FOCUS mode");
736 ESP_LOGVV(TAG,
"Switching to FAN_DIFFUSE mode");
740 ESP_LOGVV(TAG,
"Switching to FAN_QUIET mode");
818 switch (swing_mode) {
890 this->
timer_[timer_index].active =
true;
895 auto ret = this->
timer_[timer_index].active;
896 this->
timer_[timer_index].active =
false;
901 return this->
timer_[timer_index].active;
905 return this->
timer_[timer_index].time;
909 switch (timer_index) {
947 ESP_LOGVV(TAG,
"cooling_max_run_time timer expired");
954 ESP_LOGVV(TAG,
"cooling_off timer expired");
960 ESP_LOGVV(TAG,
"cooling_on timer expired");
966 ESP_LOGVV(TAG,
"fan_mode timer expired");
975 ESP_LOGVV(TAG,
"fanning_off timer expired");
980 ESP_LOGVV(TAG,
"fanning_on timer expired");
985 ESP_LOGVV(TAG,
"heating_max_run_time timer expired");
992 ESP_LOGVV(TAG,
"heating_off timer expired");
998 ESP_LOGVV(TAG,
"heating_on timer expired");
1004 ESP_LOGVV(TAG,
"idle_on timer expired");
1157 ESP_LOGCONFIG(TAG,
" Default Target Temperature Low: %.1f°C",
1161 ESP_LOGCONFIG(TAG,
" Default Target Temperature High: %.1f°C",
1165 if (config.
mode_.has_value()) {
1169 ESP_LOGCONFIG(TAG,
" Default Fan Mode: %s",
1173 ESP_LOGCONFIG(TAG,
" Default Swing Mode: %s",
1182 if (entry.preset ==
preset) {
1183 config = &entry.config;
1188 if (config !=
nullptr) {
1212 config = &entry.config;
1217 if (config !=
nullptr) {
1230 ESP_LOGI(TAG,
"No changes required to apply custom preset %s",
custom_preset);
1236 ESP_LOGW(TAG,
"Custom preset %s not configured; ignoring",
custom_preset);
1241 bool something_changed =
false;
1246 something_changed =
true;
1250 something_changed =
true;
1255 something_changed =
true;
1261 if (config.
mode_.has_value() && (this->mode != config.
mode_.value())) {
1264 something_changed =
true;
1270 something_changed =
true;
1276 something_changed =
true;
1279 return something_changed;
1285 std::vector<const char *> names;
1286 names.reserve(presets.size());
1288 names.push_back(entry.name);
1299 this->default_custom_preset_ = entry.name;
1304 this->default_custom_preset_ =
nullptr;
1312 if (this->
timer_[timer_index].active) {
1315 uint32_t elapsed = current_time - this->
timer_[timer_index].started;
1317 if (elapsed >= new_duration_ms) {
1319 ESP_LOGVV(TAG,
"timer %d completing immediately (elapsed %" PRIu32
" >= new %" PRIu32
")", timer_index, elapsed,
1321 this->
timer_[timer_index].active =
false;
1327 ESP_LOGVV(TAG,
"timer %d adjusted: elapsed %" PRIu32
", new total %" PRIu32
", remaining %" PRIu32, timer_index,
1328 elapsed, new_duration_ms, new_duration_ms - elapsed);
1329 this->
timer_[timer_index].time = new_duration_ms;
1335 this->
timer_[timer_index].time = new_duration_ms;
1373 if (supports_dehumidification) {
1379 if (supports_humidification) {
1430 LOG_CLIMATE(
"",
"Thermostat",
this);
1433 " On boot, restore from: %s\n"
1434 " Use Start-up Delay: %s",
1436 : LOG_STR_LITERAL(
"MEMORY"),
1443 " Cooling Parameters:\n"
1444 " Deadband: %.1f°C\n"
1445 " Overrun: %.1f°C\n"
1446 " Minimum Off Time: %" PRIu32
"s\n"
1447 " Minimum Run Time: %" PRIu32
"s",
1454 " Maximum Run Time: %" PRIu32
"s\n"
1455 " Supplemental Delta: %.1f°C",
1462 " Heating Parameters:\n"
1463 " Deadband: %.1f°C\n"
1464 " Overrun: %.1f°C\n"
1465 " Minimum Off Time: %" PRIu32
"s\n"
1466 " Minimum Run Time: %" PRIu32
"s",
1473 " Maximum Run Time: %" PRIu32
"s\n"
1474 " Supplemental Delta: %.1f°C",
1481 " Fan Parameters:\n"
1482 " Minimum Off Time: %" PRIu32
"s\n"
1483 " Minimum Run Time: %" PRIu32
"s",
1491 ESP_LOGCONFIG(TAG,
" Minimum Fan Mode Switching Time: %" PRIu32
"s",
1495 " Minimum Idle Time: %" PRIu32
"s\n"
1496 " Supported MODES:\n"
1503 " FAN_ONLY_ACTION_USES_FAN_MODE_TIMER: %s\n"
1504 " FAN_ONLY_COOLING: %s",
1516 " Supported FAN MODES:\n"
1527 " Supported SWING MODES:\n"
1532 " Supports TWO SET POINTS: %s\n"
1533 " Supported Humidity Parameters:\n"
1536 " DEHUMIDIFICATION: %s\n"
1537 " HUMIDIFICATION: %s",
1551 ESP_LOGCONFIG(TAG,
" Supported PRESETS:");
1554 ESP_LOGCONFIG(TAG,
" %s:%s", preset_name,
1555 entry.preset == this->default_preset_ ? LOG_STR_LITERAL(
" (default)") :
"");
1561 ESP_LOGCONFIG(TAG,
" Supported CUSTOM PRESETS:");
1563 const auto *preset_name = entry.name;
1564 ESP_LOGCONFIG(TAG,
" %s:%s", preset_name,
1565 (this->default_custom_preset_ !=
nullptr && strcmp(entry.name, this->default_custom_preset_) == 0)
1566 ? LOG_STR_LITERAL(
" (default)")
1576 : default_temperature(default_temperature) {}
1579 float default_temperature_high)
1580 : default_temperature_low(default_temperature_low), default_temperature_high(default_temperature_high) {}
BedjetMode mode
BedJet operating mode.
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
void stop_action()
Stop any action connected to this trigger.
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Inform the parent automation that the event has triggered.
This class is used to encode all control actions on a climate device.
const optional< ClimateSwingMode > & get_swing_mode() const
const optional< float > & get_target_humidity() const
bool has_custom_preset() const
const optional< ClimateFanMode > & get_fan_mode() const
StringRef get_custom_preset() const
ClimateMode mode
The active mode of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
float target_temperature
The target temperature of the climate device.
float current_humidity
The current humidity of the climate device, as reported from the integration.
ClimateSwingMode swing_mode
The active swing mode of the climate device.
float target_temperature_low
The minimum target temperature of the climate device, for climate devices with split target temperatu...
void set_supported_custom_presets(std::initializer_list< const char * > presets)
Set the supported custom presets (stored on Climate, referenced by ClimateTraits).
bool set_preset_(ClimatePreset preset)
Set preset. Reset custom preset. Return true if preset has been changed.
bool set_custom_preset_(const char *preset)
Set custom preset. Reset primary preset. Return true if preset has been changed.
bool has_custom_preset() const
Check if a custom preset is currently active.
float current_temperature
The current temperature of the climate device, as reported from the integration.
ClimateAction action
The active state of the climate device.
StringRef get_custom_preset() const
Get the active custom preset (read-only access). Returns StringRef.
void publish_state()
Publish the state of the climate device, to be called from integrations.
optional< ClimatePreset > preset
The active preset of the climate device.
optional< ClimateDeviceRestoreState > restore_state_()
Restore the state of the climate device, call this from your setup() method.
float target_humidity
The target humidity of the climate device.
float target_temperature_high
The maximum target temperature of the climate device, for climate devices with split target temperatu...
void add_feature_flags(uint32_t feature_flags)
void add_supported_fan_mode(ClimateFanMode mode)
float get_visual_min_humidity() const
void add_supported_preset(ClimatePreset preset)
float get_visual_max_humidity() const
void add_supported_mode(ClimateMode mode)
float get_visual_max_temperature() const
void add_supported_swing_mode(ClimateSwingMode mode)
float get_visual_min_temperature() const
void add_on_state_callback(F &&callback)
Add a callback that will be called every time a filtered value arrives.
float state
This member variable stores the last state that has passed through all filters.
Trigger fan_mode_focus_trigger_
void set_supports_humidification(bool supports_humidification)
bool supports_fan_mode_off_
void switch_to_action_(climate::ClimateAction action, bool publish_state=true)
Switch the climate device to the given climate action.
Trigger supplemental_cool_action_trigger_
bool supports_fan_mode_quiet_
void set_custom_preset_config(std::initializer_list< CustomPresetEntry > presets)
FixedVector< CustomPresetEntry > custom_preset_config_
The set of custom preset configurations this thermostat supports (eg. "My Custom Preset")
float cooling_deadband_
Hysteresis values used for computing climate actions.
Trigger humidity_control_humidify_action_trigger_
float supplemental_heat_delta_
bool supports_swing_mode_vertical_
Trigger * get_cool_action_trigger()
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Trigger cool_mode_trigger_
Trigger * get_fan_only_action_trigger()
void validate_target_temperatures(bool pin_target_temperature_high)
HumidificationAction humidification_action
The current humidification action.
void set_timer_duration_in_sec_(ThermostatClimateTimerIndex timer_index, uint32_t time)
Enhanced timer duration setter with running timer adjustment.
Trigger * get_swing_mode_both_trigger()
void fan_mode_timer_callback_()
bool use_startup_delay_
Used to start "off" delay timers at boot.
bool heating_action_ready_()
Trigger temperature_change_trigger_
Trigger for target temperature changes.
bool climate_action_change_delayed()
Returns true if a climate action/fan mode transition is being delayed.
bool cooling_max_runtime_exceeded_
Flags indicating if maximum allowable run time was exceeded.
bool supports_fan_mode_medium_
const uint8_t min_timer_duration_
Minimum allowable duration in seconds for action timers.
Trigger * get_fan_mode_quiet_trigger()
Trigger humidity_control_off_action_trigger_
Trigger * get_fan_mode_focus_trigger()
OnBootRestoreFrom on_boot_restore_from_
If set to DEFAULT_PRESET then the default preset is always used.
void change_custom_preset_(const char *custom_preset)
Change to a provided custom preset setting; will reset temperature, mode, fan, and swing modes accord...
void validate_target_temperature_low()
void set_heating_maximum_run_time_in_sec(uint32_t time)
bool supports_dehumidification_
Whether the controller supports dehumidification and/or humidification.
bool supports_fan_mode_on_
Whether the controller supports turning on or off just the fan.
bool supports_swing_mode_off_
Trigger * get_heat_mode_trigger()
float set_point_minimum_differential_
Minimum differential required between set points.
Trigger * get_preset_change_trigger()
bool supports_fan_with_cooling_
Special flags – enables fan_only action to be called with cooling/heating actions.
void switch_to_swing_mode_(climate::ClimateSwingMode swing_mode, bool publish_state=true)
Switch the climate device to the given climate swing mode.
Trigger fan_mode_low_trigger_
Trigger * get_humidity_control_humidify_action_trigger()
Trigger * get_swing_mode_horizontal_trigger()
bool change_preset_internal_(const ThermostatClimateTargetTempConfig &config)
Applies the temperature, mode, fan, and swing modes of the provided config.
void set_supports_dehumidification(bool supports_dehumidification)
bool hysteresis_valid()
Set point and hysteresis validation.
Trigger * get_humidity_control_dehumidify_action_trigger()
float humidity_hysteresis_
Hysteresis values used for computing humidification action.
Trigger cool_action_trigger_
Trigger for cooling action/mode.
bool supplemental_heating_required_()
float prev_target_humidity_
Store previously-known humidity and temperatures.
void check_humidity_change_trigger_()
Check if the humidity change trigger should be called.
Trigger * get_fan_only_mode_trigger()
Trigger * get_supplemental_cool_action_trigger()
Trigger supplemental_heat_action_trigger_
void switch_to_supplemental_action_(climate::ClimateAction action)
bool supports_fan_mode_high_
bool fanning_action_ready_()
void switch_to_mode_(climate::ClimateMode mode, bool publish_state=true)
Switch the climate device to the given climate mode.
Trigger * get_heat_action_trigger()
bool cooling_action_ready_()
void heating_max_run_time_timer_callback_()
Trigger * prev_humidity_control_trigger_
void validate_target_temperature_high()
void heating_off_timer_callback_()
bool supports_fan_only_action_uses_fan_mode_timer_
Special flag – enables fan_modes to share timer with fan_only climate action.
void switch_to_humidity_control_action_(HumidificationAction action)
Trigger * get_humidity_change_trigger()
void switch_to_fan_mode_(climate::ClimateFanMode fan_mode, bool publish_state=true)
Switch the climate device to the given climate fan mode.
void set_heating_minimum_off_time_in_sec(uint32_t time)
void dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config)
void heating_on_timer_callback_()
Trigger dry_mode_trigger_
bool supports_swing_mode_both_
Whether the controller supports various swing modes.
void fanning_off_timer_callback_()
Trigger fan_only_mode_trigger_
bool humidification_required_()
climate::ClimateTraits traits() override
Return the traits of this controller.
Trigger * get_temperature_change_trigger()
void idle_on_timer_callback_()
Trigger * get_cool_mode_trigger()
Trigger * get_off_mode_trigger()
Trigger * get_auto_mode_trigger()
bool supports_fan_mode_middle_
bool supports_fan_mode_focus_
Trigger heat_mode_trigger_
Trigger humidity_change_trigger_
Trigger for target humidity changes.
float prev_target_temperature_low_
bool timer_active_(ThermostatClimateTimerIndex timer_index)
float supplemental_cool_delta_
Maximum allowable temperature deltas before engaging supplemental cooling/heating actions.
Trigger * prev_mode_trigger_
void set_heating_minimum_run_time_in_sec(uint32_t time)
climate::ClimateSwingMode prev_swing_mode_
bool supplemental_cooling_required_()
Trigger swing_mode_vertical_trigger_
void set_cooling_minimum_off_time_in_sec(uint32_t time)
climate::ClimateAction delayed_climate_action()
Returns the climate action that is being delayed (check climate_action_change_delayed(),...
Trigger * get_dry_action_trigger()
void set_fanning_minimum_off_time_in_sec(uint32_t time)
sensor::Sensor * sensor_
The sensor used for getting the current temperature.
void set_default_preset(const char *custom_preset)
Trigger fan_mode_middle_trigger_
void call_timer_callback_(ThermostatClimateTimerIndex timer_index)
Call the appropriate timer callback based on timer index.
bool drying_action_ready_()
Trigger fan_mode_medium_trigger_
Trigger idle_action_trigger_
Trigger for idle action/off mode.
Trigger * get_fan_mode_off_trigger()
Trigger swing_mode_off_trigger_
bool humidity_hysteresis_valid()
uint32_t timer_duration_(ThermostatClimateTimerIndex timer_index)
climate::ClimateMode prev_mode_
Trigger * get_dry_mode_trigger()
Trigger humidity_control_dehumidify_action_trigger_
Humidity control triggers.
Trigger fan_only_action_trigger_
Trigger for fan-only action/mode.
Trigger * get_heat_cool_mode_trigger()
bool limit_setpoints_for_heat_cool()
void start_timer_(ThermostatClimateTimerIndex timer_index)
Start/cancel/get status of climate action timer.
Trigger * prev_fan_mode_trigger_
Trigger fan_mode_off_trigger_
Trigger off_mode_trigger_
Trigger fan_mode_diffuse_trigger_
Trigger * get_fan_mode_diffuse_trigger()
bool supports_fan_with_heating_
bool supports_fan_mode_low_
Whether the controller supports various fan speeds and/or positions.
bool supports_fan_only_cooling_
Special flag – enables fan to be switched based on target_temperature_high.
void fanning_on_timer_callback_()
void dump_config() override
Trigger * prev_action_trigger_
A reference to the trigger that was previously active.
bool supports_auto_
Whether the controller supports auto/cooling/drying/fanning/heating.
Trigger swing_mode_both_trigger_
Swing mode triggers.
bool supports_swing_mode_horizontal_
climate::ClimateAction supplemental_action_
The current supplemental action.
std::array< ThermostatClimateTimer, THERMOSTAT_TIMER_COUNT > timer_
Climate action timers.
void set_fan_mode_minimum_switching_time_in_sec(uint32_t time)
bool supports_fan_mode_diffuse_
Trigger heat_cool_mode_trigger_
Trigger for heat/cool mode.
Trigger * get_supplemental_heat_action_trigger()
Trigger * get_fan_mode_auto_trigger()
void trigger_supplemental_action_()
void validate_target_humidity()
Trigger * get_fan_mode_middle_trigger()
float prev_target_temperature_high_
Trigger preset_change_trigger_
Trigger for preset mode changes.
void check_temperature_change_trigger_()
Check if the temperature change trigger should be called.
HumidificationAction compute_humidity_control_action_()
FixedVector< PresetEntry > preset_config_
The set of standard preset configurations this thermostat supports (Eg. AWAY, ECO,...
climate::ClimateFanMode prev_fan_mode_
Store previously-known states.
void cooling_on_timer_callback_()
void cooling_off_timer_callback_()
void set_humidity_hysteresis(float humidity_hysteresis)
Trigger swing_mode_horizontal_trigger_
Trigger fan_mode_quiet_trigger_
Trigger * get_fan_mode_medium_trigger()
bool cancel_timer_(ThermostatClimateTimerIndex timer_index)
climate::ClimateAction compute_supplemental_action_()
float prev_target_temperature_
climate::ClimatePreset default_preset_
Default standard preset to use on start up.
void set_fanning_minimum_run_time_in_sec(uint32_t time)
sensor::Sensor * humidity_sensor_
The sensor used for getting the current humidity.
bool fan_mode_change_delayed()
void cooling_max_run_time_timer_callback_()
set_timeout() callbacks for various actions (see above)
bool supports_humidification_
Trigger * prev_swing_mode_trigger_
bool supports_fan_mode_auto_
Whether the controller supports fan auto mode.
Trigger * get_idle_action_trigger()
Trigger * get_swing_mode_vertical_trigger()
void set_cooling_maximum_run_time_in_sec(uint32_t time)
Trigger fan_mode_on_trigger_
Fan mode triggers.
climate::ClimateAction compute_action_(bool ignore_timers=false)
Re-compute the required action of this climate controller.
bool dehumidification_required_()
void validate_target_temperature()
bool supports_two_points_
Whether the controller supports two set points.
Trigger * get_humidity_control_off_action_trigger()
bool setup_complete_
setup_complete_ blocks modifying/resetting the temps immediately after boot
Trigger * get_fan_mode_low_trigger()
void set_idle_minimum_time_in_sec(uint32_t time)
Trigger auto_mode_trigger_
Trigger for auto mode.
Trigger fan_mode_auto_trigger_
Trigger * get_fan_mode_high_trigger()
bool idle_action_ready_()
Is the action ready to be called? Returns true if so.
Trigger dry_action_trigger_
Trigger for dry (dehumidification) mode.
Trigger * get_fan_mode_on_trigger()
void change_preset_(climate::ClimatePreset preset)
Change to a provided preset setting; will reset temperature, mode, fan, and swing modes accordingly.
void set_cooling_minimum_run_time_in_sec(uint32_t time)
Trigger * get_swing_mode_off_trigger()
void refresh()
Call triggers based on updated climate states (modes/actions)
Trigger fan_mode_high_trigger_
bool heating_max_runtime_exceeded_
Trigger heat_action_trigger_
Trigger for heating action/mode.
bool cooling_required_()
Check if cooling/fanning/heating actions are required; returns true if so.
ClimateSwingMode swing_mode
@ CLIMATE_SUPPORTS_CURRENT_HUMIDITY
@ CLIMATE_SUPPORTS_TARGET_HUMIDITY
@ CLIMATE_SUPPORTS_TWO_POINT_TARGET_TEMPERATURE
@ CLIMATE_SUPPORTS_CURRENT_TEMPERATURE
@ CLIMATE_SUPPORTS_ACTION
const LogString * climate_swing_mode_to_string(ClimateSwingMode swing_mode)
Convert the given ClimateSwingMode to a human-readable string.
const LogString * climate_preset_to_string(ClimatePreset preset)
Convert the given PresetMode to a human-readable string.
ClimatePreset
Enum for all preset modes NOTE: If adding values, update ClimatePresetMask in climate_traits....
@ CLIMATE_PRESET_NONE
No preset is active.
const LogString * climate_fan_mode_to_string(ClimateFanMode fan_mode)
Convert the given ClimateFanMode to a human-readable string.
ClimateSwingMode
Enum for all modes a climate swing can be in NOTE: If adding values, update ClimateSwingModeMask in c...
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_HORIZONTAL
The fan mode is set to Horizontal.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
@ CLIMATE_SWING_BOTH
The fan mode is set to Both.
ClimateMode
Enum for all modes a climate device can be in.
@ CLIMATE_MODE_DRY
The climate device is set to dry/humidity mode.
@ CLIMATE_MODE_FAN_ONLY
The climate device only has the fan enabled, no heating or cooling is taking place.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
@ CLIMATE_MODE_HEAT_COOL
The climate device is set to heat/cool to reach the target temperature.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_MODE_AUTO
The climate device is adjusting the temperature dynamically.
const LogString * climate_mode_to_string(ClimateMode mode)
Convert the given ClimateMode to a human-readable string.
ClimateAction
Enum for the current action of the climate device. Values match those of ClimateMode.
@ CLIMATE_ACTION_OFF
The climate device is off (inactive or no power)
@ CLIMATE_ACTION_IDLE
The climate device is idle (monitoring climate but no action needed)
@ CLIMATE_ACTION_DRYING
The climate device is drying.
@ CLIMATE_ACTION_HEATING
The climate device is actively heating.
@ CLIMATE_ACTION_COOLING
The climate device is actively cooling.
@ CLIMATE_ACTION_FAN
The climate device is in fan only mode.
ClimateFanMode
NOTE: If adding values, update ClimateFanModeMask in climate_traits.h to use the new last value.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_DIFFUSE
The fan mode is set to Diffuse.
@ CLIMATE_FAN_ON
The fan mode is set to On.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
@ CLIMATE_FAN_FOCUS
The fan mode is set to Focus.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_MIDDLE
The fan mode is set to Middle.
@ CLIMATE_FAN_QUIET
The fan mode is set to Quiet.
@ CLIMATE_FAN_OFF
The fan mode is set to Off.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
ThermostatClimateTimerIndex
@ THERMOSTAT_TIMER_HEATING_OFF
@ THERMOSTAT_TIMER_IDLE_ON
@ THERMOSTAT_TIMER_FANNING_ON
@ THERMOSTAT_TIMER_COOLING_OFF
@ THERMOSTAT_TIMER_FANNING_OFF
@ THERMOSTAT_TIMER_FAN_MODE
@ THERMOSTAT_TIMER_HEATING_ON
@ THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME
@ THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME
@ THERMOSTAT_TIMER_COOLING_ON
@ THERMOSTAT_HUMIDITY_CONTROL_ACTION_NONE
@ THERMOSTAT_HUMIDITY_CONTROL_ACTION_HUMIDIFY
@ THERMOSTAT_HUMIDITY_CONTROL_ACTION_OFF
@ THERMOSTAT_HUMIDITY_CONTROL_ACTION_DEHUMIDIFY
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.
optional< climate::ClimateSwingMode > swing_mode_
optional< climate::ClimateFanMode > fan_mode_
float default_temperature_low
optional< climate::ClimateMode > mode_
float default_temperature
ThermostatClimateTargetTempConfig()
float default_temperature_high