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::LightEntity Class Reference

Handle to a Light entity. More...

#include <entity_handles.hpp>

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

Public Member Functions

std::optional< LightInfoinfo () const
 
std::optional< LightStatestate () const
 
std::vector< ColorModesupported_color_modes () const
 
float min_mireds () const
 
float max_mireds () const
 
std::vector< std::string > effects () const
 
float brightness () const
 
ColorMode color_mode () const
 
float color_brightness () const
 
float red () const
 
float green () const
 
float blue () const
 
float white () const
 
float color_temperature () const
 
float cold_white () const
 
float warm_white () const
 
std::string effect () const
 
void command (LightCommand 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_brightness (float b) const
 
void set_rgb (const float r, const float g, const float b) const
 
- Public Member Functions inherited from esphome::api::ToggleEntity< LightEntity >
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 Light entity.

Member Function Documentation

◆ blue()

float esphome::api::LightEntity::blue ( ) const
inline

◆ brightness()

float esphome::api::LightEntity::brightness ( ) const
inline

◆ cold_white()

float esphome::api::LightEntity::cold_white ( ) const
inline

◆ color_brightness()

float esphome::api::LightEntity::color_brightness ( ) const
inline

◆ color_mode()

ColorMode esphome::api::LightEntity::color_mode ( ) const
inline

◆ color_temperature()

float esphome::api::LightEntity::color_temperature ( ) const
inline

◆ command()

void esphome::api::LightEntity::command ( LightCommand  c) const
inline

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

◆ effect()

std::string esphome::api::LightEntity::effect ( ) const
inline

◆ effects()

std::vector< std::string > esphome::api::LightEntity::effects ( ) const
inline

◆ green()

float esphome::api::LightEntity::green ( ) const
inline

◆ info()

std::optional< LightInfo > esphome::api::LightEntity::info ( ) const
inline

◆ max_mireds()

float esphome::api::LightEntity::max_mireds ( ) const
inline

◆ min_mireds()

float esphome::api::LightEntity::min_mireds ( ) const
inline

◆ red()

float esphome::api::LightEntity::red ( ) const
inline

◆ set_brightness()

void esphome::api::LightEntity::set_brightness ( float  b) const
inline

◆ set_power()

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

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

◆ set_rgb()

void esphome::api::LightEntity::set_rgb ( const float  r,
const float  g,
const float  b 
) const
inline

◆ state()

std::optional< LightState > esphome::api::LightEntity::state ( ) const
inline

◆ supported_color_modes()

std::vector< ColorMode > esphome::api::LightEntity::supported_color_modes ( ) const
inline

◆ type()

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

◆ warm_white()

float esphome::api::LightEntity::warm_white ( ) const
inline

◆ white()

float esphome::api::LightEntity::white ( ) const
inline

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