|
ESPHome 2025.12.0-dev
|
Data Structures | |
| class | Climate |
| ClimateDevice - This is the base class for all climate integrations. More... | |
| class | ClimateCall |
| This class is used to encode all control actions on a climate device. More... | |
| struct | ClimateDeviceRestoreState |
| Struct used to save the state of the climate device in restore memory. More... | |
| class | ClimateTraits |
| class | ControlAction |
| class | ControlTrigger |
| class | StateTrigger |
Typedefs | |
| using | ClimateModeMask = FiniteSetMask<ClimateMode, DefaultBitPolicy<ClimateMode, CLIMATE_MODE_AUTO + 1>> |
| using | ClimateFanModeMask = FiniteSetMask<ClimateFanMode, DefaultBitPolicy<ClimateFanMode, CLIMATE_FAN_QUIET + 1>> |
| using | ClimateSwingModeMask |
| using | ClimatePresetMask = FiniteSetMask<ClimatePreset, DefaultBitPolicy<ClimatePreset, CLIMATE_PRESET_ACTIVITY + 1>> |
Functions | |
| template<typename T > | |
| bool | set_primary_mode (optional< T > &primary, const char *&custom_ptr, T value) |
| Template helper for setting primary modes (fan_mode, preset) with mutual exclusion. | |
| template<typename T > | |
| bool | set_custom_mode (const char *&custom_ptr, optional< T > &primary, const char *found_ptr, bool has_custom) |
| Template helper for setting custom modes (custom_fan_mode_, custom_preset_) with mutual exclusion. | |
| struct esphome::climate::ClimateDeviceRestoreState | __attribute__ ((packed)) |
| const LogString * | climate_mode_to_string (ClimateMode mode) |
| Convert the given ClimateMode to a human-readable string. | |
| const LogString * | climate_action_to_string (ClimateAction action) |
| Convert the given ClimateAction to a human-readable string. | |
| const LogString * | climate_fan_mode_to_string (ClimateFanMode mode) |
| Convert the given ClimateFanMode to a human-readable string. | |
| const LogString * | climate_swing_mode_to_string (ClimateSwingMode 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. | |
| bool | vector_contains (const std::vector< const char * > &vec, const char *value) |
| const char * | vector_find (const std::vector< const char * > &vec, const char *value) |
Variables | |
| constexpr StringToUint8 | CLIMATE_MODES_BY_STR [] |
| constexpr StringToUint8 | CLIMATE_FAN_MODES_BY_STR [] |
| constexpr StringToUint8 | CLIMATE_PRESETS_BY_STR [] |
| constexpr StringToUint8 | CLIMATE_SWING_MODES_BY_STR [] |
| esphome::climate::Climate | __attribute__ |
| using esphome::climate::ClimateFanModeMask = FiniteSetMask<ClimateFanMode, DefaultBitPolicy<ClimateFanMode, CLIMATE_FAN_QUIET + 1>> |
Definition at line 17 of file climate_traits.h.
| using esphome::climate::ClimateModeMask = FiniteSetMask<ClimateMode, DefaultBitPolicy<ClimateMode, CLIMATE_MODE_AUTO + 1>> |
Definition at line 16 of file climate_traits.h.
| using esphome::climate::ClimatePresetMask = FiniteSetMask<ClimatePreset, DefaultBitPolicy<ClimatePreset, CLIMATE_PRESET_ACTIVITY + 1>> |
Definition at line 20 of file climate_traits.h.
Definition at line 18 of file climate_traits.h.
| enum esphome::climate::ClimateAction : uint8_t |
Enum for the current action of the climate device. Values match those of ClimateMode.
Definition at line 32 of file climate_mode.h.
| enum esphome::climate::ClimateFanMode : uint8_t |
NOTE: If adding values, update ClimateFanModeMask in climate_traits.h to use the new last value.
Definition at line 48 of file climate_mode.h.
| enum esphome::climate::ClimateFeature : uint32_t |
Definition at line 105 of file climate_mode.h.
| enum esphome::climate::ClimateMode : uint8_t |
Enum for all modes a climate device can be in.
NOTE: If adding values, update ClimateModeMask in climate_traits.h to use the new last value
Definition at line 11 of file climate_mode.h.
| enum esphome::climate::ClimatePreset : uint8_t |
Enum for all preset modes NOTE: If adding values, update ClimatePresetMask in climate_traits.h to use the new last value.
| Enumerator | |
|---|---|
| CLIMATE_PRESET_NONE | No preset is active. |
| CLIMATE_PRESET_HOME | Device is in home preset. |
| CLIMATE_PRESET_AWAY | Device is in away preset. |
| CLIMATE_PRESET_BOOST | Device is in boost preset. |
| CLIMATE_PRESET_COMFORT | Device is in comfort preset. |
| CLIMATE_PRESET_ECO | Device is running an energy-saving preset. |
| CLIMATE_PRESET_SLEEP | Device is prepared for sleep. |
| CLIMATE_PRESET_ACTIVITY | Device is reacting to activity (e.g., movement sensors) |
Definition at line 86 of file climate_mode.h.
| enum esphome::climate::ClimateSwingMode : uint8_t |
Enum for all modes a climate swing can be in NOTE: If adding values, update ClimateSwingModeMask in climate_traits.h to use the new last value.
Definition at line 73 of file climate_mode.h.
| struct esphome::climate::ClimateDeviceRestoreState esphome::climate::__attribute__ | ( | (packed) | ) |
| const LogString * esphome::climate::climate_action_to_string | ( | ClimateAction | action | ) |
Convert the given ClimateAction to a human-readable string.
Definition at line 26 of file climate_mode.cpp.
| const LogString * esphome::climate::climate_fan_mode_to_string | ( | ClimateFanMode | fan_mode | ) |
Convert the given ClimateFanMode to a human-readable string.
Definition at line 45 of file climate_mode.cpp.
| const LogString * esphome::climate::climate_mode_to_string | ( | ClimateMode | mode | ) |
Convert the given ClimateMode to a human-readable string.
Definition at line 6 of file climate_mode.cpp.
| const LogString * esphome::climate::climate_preset_to_string | ( | ClimatePreset | preset | ) |
Convert the given PresetMode to a human-readable string.
Definition at line 87 of file climate_mode.cpp.
| const LogString * esphome::climate::climate_swing_mode_to_string | ( | ClimateSwingMode | swing_mode | ) |
Convert the given ClimateSwingMode to a human-readable string.
Definition at line 72 of file climate_mode.cpp.
| bool esphome::climate::set_custom_mode | ( | const char *& | custom_ptr, |
| optional< T > & | primary, | ||
| const char * | found_ptr, | ||
| bool | has_custom ) |
Template helper for setting custom modes (custom_fan_mode_, custom_preset_) with mutual exclusion.
This helper ensures setting a custom mode automatically clears its corresponding primary mode. It also validates that the custom mode exists in the device's supported modes (lifetime safety).
Example state transitions: Before: fan_mode=CLIMATE_FAN_HIGH, custom_fan_mode_=nullptr Call: set_custom_fan_mode_("Turbo") After: fan_mode=nullopt, custom_fan_mode_="Turbo" (pointer from traits)
Lifetime Safety:
| custom_ptr | Reference to the custom mode pointer to set |
| primary | The primary mode optional to clear |
| found_ptr | The validated pointer from traits (nullptr if not found) |
| has_custom | Whether a custom mode is currently active |
Definition at line 646 of file climate.cpp.
| bool esphome::climate::set_primary_mode | ( | optional< T > & | primary, |
| const char *& | custom_ptr, | ||
| T | value ) |
Template helper for setting primary modes (fan_mode, preset) with mutual exclusion.
Climate devices have mutually exclusive mode pairs:
Only one mode in each pair can be active at a time. This helper ensures setting a primary mode automatically clears its corresponding custom mode.
Example state transitions: Before: custom_fan_mode_="Turbo", fan_mode=nullopt Call: set_fan_mode_(CLIMATE_FAN_HIGH) After: custom_fan_mode_=nullptr, fan_mode=CLIMATE_FAN_HIGH
| primary | The primary mode optional (fan_mode or preset) |
| custom_ptr | Reference to the custom mode pointer (custom_fan_mode_ or custom_preset_) |
| value | The new primary mode value to set |
Definition at line 612 of file climate.cpp.
|
inline |
Definition at line 24 of file climate_traits.h.
|
inline |
Definition at line 33 of file climate_traits.h.
| esphome::climate::Climate esphome::climate::__attribute__ |
|
constexpr |
Definition at line 27 of file climate.cpp.
|
constexpr |
Definition at line 17 of file climate.cpp.
|
constexpr |
Definition at line 34 of file climate.cpp.
|
constexpr |
Definition at line 40 of file climate.cpp.