ESPHome  2024.11.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::fan::FanCall Class Reference

#include <fan.h>

Public Member Functions

 FanCall (Fan &parent)
 
FanCallset_state (bool binary_state)
 
FanCallset_state (optional< bool > binary_state)
 
optional< bool > get_state () const
 
FanCallset_oscillating (bool oscillating)
 
FanCallset_oscillating (optional< bool > oscillating)
 
optional< bool > get_oscillating () const
 
FanCallset_speed (int speed)
 
 ESPDEPRECATED ("set_speed() with string argument is deprecated, use integer argument instead.", "2021.9") FanCall &set_speed(const char *legacy_speed)
 
optional< int > get_speed () const
 
FanCallset_direction (FanDirection direction)
 
FanCallset_direction (optional< FanDirection > direction)
 
optional< FanDirectionget_direction () const
 
FanCallset_preset_mode (const std::string &preset_mode)
 
std::string get_preset_mode () const
 
void perform ()
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

Fanparent_
 
optional< bool > binary_state_
 
optional< bool > oscillating_
 
optional< int > speed_
 
optional< FanDirectiondirection_ {}
 
std::string preset_mode_ {}
 

Detailed Description

Definition at line 37 of file fan.h.

Constructor & Destructor Documentation

◆ FanCall()

esphome::fan::FanCall::FanCall ( Fan parent)
inlineexplicit

Definition at line 39 of file fan.h.

Member Function Documentation

◆ ESPDEPRECATED()

esphome::fan::FanCall::ESPDEPRECATED ( "set_speed() with string argument is  deprecated,
use integer argument instead."  ,
"2021.9"   
) const &

◆ get_direction()

optional<FanDirection> esphome::fan::FanCall::get_direction ( ) const
inline

Definition at line 74 of file fan.h.

◆ get_oscillating()

optional<bool> esphome::fan::FanCall::get_oscillating ( ) const
inline

Definition at line 58 of file fan.h.

◆ get_preset_mode()

std::string esphome::fan::FanCall::get_preset_mode ( ) const
inline

Definition at line 79 of file fan.h.

◆ get_speed()

optional<int> esphome::fan::FanCall::get_speed ( ) const
inline

Definition at line 65 of file fan.h.

◆ get_state()

optional<bool> esphome::fan::FanCall::get_state ( ) const
inline

Definition at line 49 of file fan.h.

◆ perform()

void esphome::fan::FanCall::perform ( )

Definition at line 20 of file fan.cpp.

◆ set_direction() [1/2]

FanCall& esphome::fan::FanCall::set_direction ( FanDirection  direction)
inline

Definition at line 66 of file fan.h.

◆ set_direction() [2/2]

FanCall& esphome::fan::FanCall::set_direction ( optional< FanDirection direction)
inline

Definition at line 70 of file fan.h.

◆ set_oscillating() [1/2]

FanCall& esphome::fan::FanCall::set_oscillating ( bool  oscillating)
inline

Definition at line 50 of file fan.h.

◆ set_oscillating() [2/2]

FanCall& esphome::fan::FanCall::set_oscillating ( optional< bool >  oscillating)
inline

Definition at line 54 of file fan.h.

◆ set_preset_mode()

FanCall& esphome::fan::FanCall::set_preset_mode ( const std::string &  preset_mode)
inline

Definition at line 75 of file fan.h.

◆ set_speed()

FanCall& esphome::fan::FanCall::set_speed ( int  speed)
inline

Definition at line 59 of file fan.h.

◆ set_state() [1/2]

FanCall& esphome::fan::FanCall::set_state ( bool  binary_state)
inline

Definition at line 41 of file fan.h.

◆ set_state() [2/2]

FanCall& esphome::fan::FanCall::set_state ( optional< bool >  binary_state)
inline

Definition at line 45 of file fan.h.

◆ validate_()

void esphome::fan::FanCall::validate_ ( )
protected

Definition at line 41 of file fan.cpp.

Field Documentation

◆ binary_state_

optional<bool> esphome::fan::FanCall::binary_state_
protected

Definition at line 87 of file fan.h.

◆ direction_

optional<FanDirection> esphome::fan::FanCall::direction_ {}
protected

Definition at line 90 of file fan.h.

◆ oscillating_

optional<bool> esphome::fan::FanCall::oscillating_
protected

Definition at line 88 of file fan.h.

◆ parent_

Fan& esphome::fan::FanCall::parent_
protected

Definition at line 86 of file fan.h.

◆ preset_mode_

std::string esphome::fan::FanCall::preset_mode_ {}
protected

Definition at line 91 of file fan.h.

◆ speed_

optional<int> esphome::fan::FanCall::speed_
protected

Definition at line 89 of file fan.h.


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