8namespace media_player {
14 void play(
const Ts &...
x)
override {
15 this->
parent_->make_call().set_command(Command).set_announcement(this->announcement_.value(
x...)).perform();
19template<
typename... Ts>
21template<
typename... Ts>
23template<
typename... Ts>
25template<
typename... Ts>
27template<
typename... Ts>
29template<
typename... Ts>
31template<
typename... Ts>
33template<
typename... Ts>
35template<
typename... Ts>
37template<
typename... Ts>
39template<
typename... Ts>
41template<
typename... Ts>
43template<
typename... Ts>
45template<
typename... Ts>
47template<
typename... Ts>
49template<
typename... Ts>
51template<
typename... Ts>
53template<
typename... Ts>
55template<
typename... Ts>
60 TEMPLATABLE_VALUE(std::string, media_url)
61 TEMPLATABLE_VALUE(
bool, announcement)
62 void play(
const Ts &...
x)
override {
63 auto call = this->
parent_->make_call();
65 call.set_command(Command);
66 call.set_media_url(this->media_url_.value(
x...)).set_announcement(this->announcement_.value(
x...)).perform();
70template<
typename... Ts>
72template<
typename... Ts>
76 TEMPLATABLE_VALUE(
float, volume)
77 void play(
const Ts &...
x)
override { this->
parent_->make_call().set_volume(this->volume_.value(
x...)).perform(); }
97static_assert(
sizeof(StateAnyForwarder) <=
sizeof(
void *));
98static_assert(std::is_trivially_copyable_v<StateAnyForwarder>);
99static_assert(
sizeof(StateEnterForwarder<MediaPlayerState::MEDIA_PLAYER_STATE_IDLE>) <=
sizeof(
void *));
100static_assert(std::is_trivially_copyable_v<StateEnterForwarder<MediaPlayerState::MEDIA_PLAYER_STATE_IDLE>>);
virtual void play(const Ts &...x)=0
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Base class for all automation conditions.
Helper class to easily give an object a parent of type T.
Providing packet encoding functions for exchanging data with a remote host.