esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
esphome::api::FanEntity Class Reference

Handle to a Fan entity. More...

#include <entity_handles.hpp>

Inheritance diagram for esphome::api::FanEntity:
Inheritance graph
[legend]
Collaboration diagram for esphome::api::FanEntity:
Collaboration graph
[legend]

Public Member Functions

std::optional< FanInfoinfo () const
 
std::optional< FanStatestate () const
 
bool supports_oscillation () const
 
bool supports_speed () const
 
bool supports_direction () const
 
std::int32_t supported_speed_count () const
 
std::vector< std::string > supported_preset_modes () const
 
bool oscillating () const
 
FanDirection direction () const
 
std::int32_t speed_level () const
 
std::string preset_mode () const
 
void command (FanCommand c) const
 Send a fully-specified command (its key is set automatically).
 
void set_power (bool on) const
 Set on/off power (used by turn_on/turn_off/toggle).
 
void set_speed (std::int32_t level) const
 
- Public Member Functions inherited from esphome::api::ToggleEntity< FanEntity >
bool is_on () const
 
void turn_on ()
 
void turn_off ()
 
void toggle ()
 
- Public Member Functions inherited from esphome::api::TypedEntity< Derived >
std::string icon () const
 
bool disabled_by_default () const
 
EntityCategory entity_category () const
 
std::uint32_t device_id () const
 
 Entity (Client &client, const std::uint32_t key, std::string object_id, std::string name)
 
- Public Member Functions inherited from esphome::api::Entity
 Entity (Client &client, const std::uint32_t key, std::string object_id, std::string name)
 
std::uint32_t key () const noexcept
 
const std::string & object_id () const noexcept
 
const std::string & name () const noexcept
 

Static Public Member Functions

static constexpr EntityType type ()
 

Additional Inherited Members

- Protected Attributes inherited from esphome::api::Entity
Clientclient_
 
std::uint32_t key_
 
std::string object_id_
 
std::string name_
 

Detailed Description

Handle to a Fan entity.

Member Function Documentation

◆ command()

void esphome::api::FanEntity::command ( FanCommand  c) const
inline

Send a fully-specified command (its key is set automatically).

◆ direction()

FanDirection esphome::api::FanEntity::direction ( ) const
inline

◆ info()

std::optional< FanInfo > esphome::api::FanEntity::info ( ) const
inline

◆ oscillating()

bool esphome::api::FanEntity::oscillating ( ) const
inline

◆ preset_mode()

std::string esphome::api::FanEntity::preset_mode ( ) const
inline

◆ set_power()

void esphome::api::FanEntity::set_power ( bool  on) const
inline

Set on/off power (used by turn_on/turn_off/toggle).

◆ set_speed()

void esphome::api::FanEntity::set_speed ( std::int32_t  level) const
inline

◆ speed_level()

std::int32_t esphome::api::FanEntity::speed_level ( ) const
inline

◆ state()

std::optional< FanState > esphome::api::FanEntity::state ( ) const
inline

◆ supported_preset_modes()

std::vector< std::string > esphome::api::FanEntity::supported_preset_modes ( ) const
inline

◆ supported_speed_count()

std::int32_t esphome::api::FanEntity::supported_speed_count ( ) const
inline

◆ supports_direction()

bool esphome::api::FanEntity::supports_direction ( ) const
inline

◆ supports_oscillation()

bool esphome::api::FanEntity::supports_oscillation ( ) const
inline

◆ supports_speed()

bool esphome::api::FanEntity::supports_speed ( ) const
inline

◆ type()

static constexpr EntityType esphome::api::FanEntity::type ( )
inlinestaticconstexpr

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