|
ESPHome 2026.1.0-dev
|
#include <fan_traits.h>
Public Member Functions | |
| FanTraits ()=default | |
| FanTraits (bool oscillation, bool speed, bool direction, int speed_count) | |
| bool | supports_oscillation () const |
| Return if this fan supports oscillation. | |
| void | set_oscillation (bool oscillation) |
| Set whether this fan supports oscillation. | |
| bool | supports_speed () const |
| Return if this fan supports speed modes. | |
| void | set_speed (bool speed) |
| Set whether this fan supports speed levels. | |
| int | supported_speed_count () const |
| Return how many speed levels the fan has. | |
| void | set_supported_speed_count (int speed_count) |
| Set how many speed levels this fan has. | |
| bool | supports_direction () const |
| Return if this fan supports changing direction. | |
| void | set_direction (bool direction) |
| Set whether this fan supports changing direction. | |
| const std::vector< const char * > & | supported_preset_modes () const |
| Return the preset modes supported by the fan. | |
| void | set_supported_preset_modes (std::initializer_list< const char * > preset_modes) |
| Set the preset modes supported by the fan (from initializer list). | |
| void | set_supported_preset_modes (const std::vector< const char * > &preset_modes) |
| Set the preset modes supported by the fan (from vector). | |
| void | set_supported_preset_modes (const std::vector< std::string > &preset_modes)=delete |
| void | set_supported_preset_modes (std::initializer_list< std::string > preset_modes)=delete |
| bool | supports_preset_modes () const |
| Return if preset modes are supported. | |
| const char * | find_preset_mode (const char *preset_mode) const |
| Find and return the matching preset mode pointer from supported modes, or nullptr if not found. | |
| const char * | find_preset_mode (const char *preset_mode, size_t len) const |
Protected Attributes | |
| bool | oscillation_ {false} |
| bool | speed_ {false} |
| bool | direction_ {false} |
| int | speed_count_ {} |
| std::vector< const char * > | preset_modes_ {} |
Definition at line 11 of file fan_traits.h.
|
default |
|
inline |
Definition at line 14 of file fan_traits.h.
|
inline |
Find and return the matching preset mode pointer from supported modes, or nullptr if not found.
Definition at line 49 of file fan_traits.h.
|
inline |
Definition at line 52 of file fan_traits.h.
|
inline |
Set whether this fan supports changing direction.
Definition at line 32 of file fan_traits.h.
|
inline |
Set whether this fan supports oscillation.
Definition at line 20 of file fan_traits.h.
|
inline |
Set whether this fan supports speed levels.
Definition at line 24 of file fan_traits.h.
|
inline |
Set the preset modes supported by the fan (from vector).
Definition at line 40 of file fan_traits.h.
|
delete |
|
inline |
Set the preset modes supported by the fan (from initializer list).
Definition at line 36 of file fan_traits.h.
|
delete |
|
inline |
Set how many speed levels this fan has.
Definition at line 28 of file fan_traits.h.
|
inline |
Return the preset modes supported by the fan.
Definition at line 34 of file fan_traits.h.
|
inline |
Return how many speed levels the fan has.
Definition at line 26 of file fan_traits.h.
|
inline |
Return if this fan supports changing direction.
Definition at line 30 of file fan_traits.h.
|
inline |
Return if this fan supports oscillation.
Definition at line 18 of file fan_traits.h.
|
inline |
Return if preset modes are supported.
Definition at line 47 of file fan_traits.h.
|
inline |
Return if this fan supports speed modes.
Definition at line 22 of file fan_traits.h.
|
protected |
Definition at line 66 of file fan_traits.h.
|
protected |
Definition at line 64 of file fan_traits.h.
|
protected |
Definition at line 68 of file fan_traits.h.
|
protected |
Definition at line 65 of file fan_traits.h.
|
protected |
Definition at line 67 of file fan_traits.h.