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

Handle to a MediaPlayer entity. More...

#include <entity_handles.hpp>

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

Public Member Functions

std::optional< MediaPlayerInfoinfo () const
 
std::optional< MediaPlayerStatusstate () const
 
bool supports_pause () const
 
std::vector< MediaPlayerSupportedFormatsupported_formats () const
 
float volume () const
 
bool muted () const
 
void command (MediaPlayerControl c) const
 Send a fully-specified command (its key is set automatically).
 
void play () const
 
void pause () const
 
void stop () const
 
void set_volume (float v) const
 
- Public Member Functions inherited from esphome::api::TypedEntity< MediaPlayerEntity >
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 MediaPlayer entity.

Member Function Documentation

◆ command()

void esphome::api::MediaPlayerEntity::command ( MediaPlayerControl  c) const
inline

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

◆ info()

std::optional< MediaPlayerInfo > esphome::api::MediaPlayerEntity::info ( ) const
inline

◆ muted()

bool esphome::api::MediaPlayerEntity::muted ( ) const
inline

◆ pause()

void esphome::api::MediaPlayerEntity::pause ( ) const
inline

◆ play()

void esphome::api::MediaPlayerEntity::play ( ) const
inline

◆ set_volume()

void esphome::api::MediaPlayerEntity::set_volume ( float  v) const
inline

◆ state()

std::optional< MediaPlayerStatus > esphome::api::MediaPlayerEntity::state ( ) const
inline

◆ stop()

void esphome::api::MediaPlayerEntity::stop ( ) const
inline

◆ supported_formats()

std::vector< MediaPlayerSupportedFormat > esphome::api::MediaPlayerEntity::supported_formats ( ) const
inline

◆ supports_pause()

bool esphome::api::MediaPlayerEntity::supports_pause ( ) const
inline

◆ type()

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

◆ volume()

float esphome::api::MediaPlayerEntity::volume ( ) const
inline

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