mirror of
https://github.com/esphome/esphome.git
synced 2025-04-13 06:10:30 +01:00
[media_player] Don't reset enqueue command (#8465)
This commit is contained in:
parent
f131186e6b
commit
8fcbd57f2f
@ -56,7 +56,8 @@ const char *media_player_command_to_string(MediaPlayerCommand command) {
|
|||||||
|
|
||||||
void MediaPlayerCall::validate_() {
|
void MediaPlayerCall::validate_() {
|
||||||
if (this->media_url_.has_value()) {
|
if (this->media_url_.has_value()) {
|
||||||
if (this->command_.has_value()) {
|
if (this->command_.has_value() && this->command_.value() != MEDIA_PLAYER_COMMAND_ENQUEUE) {
|
||||||
|
// Don't remove an enqueue command
|
||||||
ESP_LOGW(TAG, "MediaPlayerCall: Setting both command and media_url is not needed.");
|
ESP_LOGW(TAG, "MediaPlayerCall: Setting both command and media_url is not needed.");
|
||||||
this->command_.reset();
|
this->command_.reset();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user