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

Handle to a Siren entity. More...

#include <entity_handles.hpp>

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

Public Member Functions

std::optional< SirenInfoinfo () const
 
std::optional< SirenStatestate () const
 
std::vector< std::string > tones () const
 
bool supports_duration () const
 
bool supports_volume () const
 
void command (SirenCommand 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).
 
- Public Member Functions inherited from esphome::api::ToggleEntity< SirenEntity >
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 Siren entity.

Member Function Documentation

◆ command()

void esphome::api::SirenEntity::command ( SirenCommand  c) const
inline

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

◆ info()

std::optional< SirenInfo > esphome::api::SirenEntity::info ( ) const
inline

◆ set_power()

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

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

◆ state()

std::optional< SirenState > esphome::api::SirenEntity::state ( ) const
inline

◆ supports_duration()

bool esphome::api::SirenEntity::supports_duration ( ) const
inline

◆ supports_volume()

bool esphome::api::SirenEntity::supports_volume ( ) const
inline

◆ tones()

std::vector< std::string > esphome::api::SirenEntity::tones ( ) const
inline

◆ type()

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

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