ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
climate_traits.cpp
Go to the documentation of this file.
1#include "climate_traits.h"
2
3namespace esphome::climate {
4
6
7static const ClimateCustomModes EMPTY_CUSTOM_MODES; // NOLINT
8
10 return this->supported_custom_fan_modes_ != nullptr ? *this->supported_custom_fan_modes_ : EMPTY_CUSTOM_MODES;
11}
12
14 return this->supported_custom_presets_ != nullptr ? *this->supported_custom_presets_ : EMPTY_CUSTOM_MODES;
15}
16
20
24
25} // namespace esphome::climate
const ClimateCustomModes & get_supported_custom_presets() const
Empty when the climate has no custom presets. Set them on the Climate entity.
const ClimateCustomModes & get_supported_custom_fan_modes() const
Empty when the climate has no custom fan modes. Set them on the Climate entity.
int8_t get_target_temperature_accuracy_decimals() const
int8_t get_current_temperature_accuracy_decimals() const
const ClimateCustomModes * supported_custom_fan_modes_
Owned by the Climate entity; get_traits() wires these pointers.
const ClimateCustomModes * supported_custom_presets_
ConstVector< const char *, true > ClimateCustomModes
Custom fan modes and custom presets: a flash table from codegen, or an owned copy set at runtime.
int8_t step_to_accuracy_decimals(float step)
Derive accuracy in decimals from an increment step.
Definition helpers.cpp:655