ESPHome  2024.11.3
Data Structures | Typedefs | Enumerations | Functions
esphome::media_player Namespace Reference

Data Structures

class  IsAnnouncingCondition
 
class  IsIdleCondition
 
class  IsPausedCondition
 
class  IsPlayingCondition
 
class  MediaPlayer
 
class  MediaPlayerCall
 
class  MediaPlayerCommandAction
 
class  MediaPlayerStateTrigger
 
struct  MediaPlayerSupportedFormat
 
class  MediaPlayerTraits
 
class  PlayMediaAction
 
class  StateTrigger
 
class  VolumeSetAction
 

Typedefs

template<typename... Ts>
using PlayAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_PLAY, Ts... >
 
template<typename... Ts>
using PauseAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_PAUSE, Ts... >
 
template<typename... Ts>
using StopAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_STOP, Ts... >
 
template<typename... Ts>
using ToggleAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_TOGGLE, Ts... >
 
template<typename... Ts>
using VolumeUpAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_VOLUME_UP, Ts... >
 
template<typename... Ts>
using VolumeDownAction = MediaPlayerCommandAction< MediaPlayerCommand::MEDIA_PLAYER_COMMAND_VOLUME_DOWN, Ts... >
 
using IdleTrigger = MediaPlayerStateTrigger< MediaPlayerState::MEDIA_PLAYER_STATE_IDLE >
 
using PlayTrigger = MediaPlayerStateTrigger< MediaPlayerState::MEDIA_PLAYER_STATE_PLAYING >
 
using PauseTrigger = MediaPlayerStateTrigger< MediaPlayerState::MEDIA_PLAYER_STATE_PAUSED >
 
using AnnouncementTrigger = MediaPlayerStateTrigger< MediaPlayerState::MEDIA_PLAYER_STATE_ANNOUNCING >
 

Enumerations

enum  MediaPlayerState : uint8_t {
  MEDIA_PLAYER_STATE_NONE = 0, MEDIA_PLAYER_STATE_IDLE = 1, MEDIA_PLAYER_STATE_PLAYING = 2, MEDIA_PLAYER_STATE_PAUSED = 3,
  MEDIA_PLAYER_STATE_ANNOUNCING = 4
}
 
enum  MediaPlayerCommand : uint8_t {
  MEDIA_PLAYER_COMMAND_PLAY = 0, MEDIA_PLAYER_COMMAND_PAUSE = 1, MEDIA_PLAYER_COMMAND_STOP = 2, MEDIA_PLAYER_COMMAND_MUTE = 3,
  MEDIA_PLAYER_COMMAND_UNMUTE = 4, MEDIA_PLAYER_COMMAND_TOGGLE = 5, MEDIA_PLAYER_COMMAND_VOLUME_UP = 6, MEDIA_PLAYER_COMMAND_VOLUME_DOWN = 7
}
 
enum  MediaPlayerFormatPurpose : uint8_t { MediaPlayerFormatPurpose::PURPOSE_DEFAULT = 0, MediaPlayerFormatPurpose::PURPOSE_ANNOUNCEMENT = 1 }
 

Functions

const char * media_player_state_to_string (MediaPlayerState state)
 
const char * media_player_command_to_string (MediaPlayerCommand command)
 

Typedef Documentation

◆ AnnouncementTrigger

using esphome::media_player::AnnouncementTrigger = typedef MediaPlayerStateTrigger<MediaPlayerState::MEDIA_PLAYER_STATE_ANNOUNCING>

Definition at line 59 of file automation.h.

◆ IdleTrigger

using esphome::media_player::IdleTrigger = typedef MediaPlayerStateTrigger<MediaPlayerState::MEDIA_PLAYER_STATE_IDLE>

Definition at line 56 of file automation.h.

◆ PauseAction

template<typename... Ts>
using esphome::media_player::PauseAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_PAUSE, Ts...>

Definition at line 19 of file automation.h.

◆ PauseTrigger

using esphome::media_player::PauseTrigger = typedef MediaPlayerStateTrigger<MediaPlayerState::MEDIA_PLAYER_STATE_PAUSED>

Definition at line 58 of file automation.h.

◆ PlayAction

template<typename... Ts>
using esphome::media_player::PlayAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_PLAY, Ts...>

Definition at line 17 of file automation.h.

◆ PlayTrigger

using esphome::media_player::PlayTrigger = typedef MediaPlayerStateTrigger<MediaPlayerState::MEDIA_PLAYER_STATE_PLAYING>

Definition at line 57 of file automation.h.

◆ StopAction

template<typename... Ts>
using esphome::media_player::StopAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_STOP, Ts...>

Definition at line 21 of file automation.h.

◆ ToggleAction

template<typename... Ts>
using esphome::media_player::ToggleAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_TOGGLE, Ts...>

Definition at line 23 of file automation.h.

◆ VolumeDownAction

template<typename... Ts>
using esphome::media_player::VolumeDownAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_VOLUME_DOWN, Ts...>

Definition at line 27 of file automation.h.

◆ VolumeUpAction

template<typename... Ts>
using esphome::media_player::VolumeUpAction = typedef MediaPlayerCommandAction<MediaPlayerCommand::MEDIA_PLAYER_COMMAND_VOLUME_UP, Ts...>

Definition at line 25 of file automation.h.

Enumeration Type Documentation

◆ MediaPlayerCommand

Enumerator
MEDIA_PLAYER_COMMAND_PLAY 
MEDIA_PLAYER_COMMAND_PAUSE 
MEDIA_PLAYER_COMMAND_STOP 
MEDIA_PLAYER_COMMAND_MUTE 
MEDIA_PLAYER_COMMAND_UNMUTE 
MEDIA_PLAYER_COMMAND_TOGGLE 
MEDIA_PLAYER_COMMAND_VOLUME_UP 
MEDIA_PLAYER_COMMAND_VOLUME_DOWN 

Definition at line 18 of file media_player.h.

◆ MediaPlayerFormatPurpose

Enumerator
PURPOSE_DEFAULT 
PURPOSE_ANNOUNCEMENT 

Definition at line 30 of file media_player.h.

◆ MediaPlayerState

Enumerator
MEDIA_PLAYER_STATE_NONE 
MEDIA_PLAYER_STATE_IDLE 
MEDIA_PLAYER_STATE_PLAYING 
MEDIA_PLAYER_STATE_PAUSED 
MEDIA_PLAYER_STATE_ANNOUNCING 

Definition at line 9 of file media_player.h.

Function Documentation

◆ media_player_command_to_string()

const char * esphome::media_player::media_player_command_to_string ( MediaPlayerCommand  command)

Definition at line 26 of file media_player.cpp.

◆ media_player_state_to_string()

const char * esphome::media_player::media_player_state_to_string ( MediaPlayerState  state)

Definition at line 10 of file media_player.cpp.