mirror of
https://github.com/esphome/esphome.git
synced 2026-01-10 12:10:48 -07:00
[voice_assistant] Combine log statements to reduce loop blocking (#12930)
This commit is contained in:
@@ -429,10 +429,12 @@ void VoiceAssistant::client_subscription(api::APIConnection *client, bool subscr
|
||||
}
|
||||
|
||||
if (this->api_client_ != nullptr) {
|
||||
ESP_LOGE(TAG, "Multiple API Clients attempting to connect to Voice Assistant");
|
||||
ESP_LOGE(TAG, "Current client: %s (%s)", this->api_client_->get_name().c_str(),
|
||||
this->api_client_->get_peername().c_str());
|
||||
ESP_LOGE(TAG, "New client: %s (%s)", client->get_name().c_str(), client->get_peername().c_str());
|
||||
ESP_LOGE(TAG,
|
||||
"Multiple API Clients attempting to connect to Voice Assistant\n"
|
||||
"Current client: %s (%s)\n"
|
||||
"New client: %s (%s)",
|
||||
this->api_client_->get_name().c_str(), this->api_client_->get_peername().c_str(),
|
||||
client->get_name().c_str(), client->get_peername().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -864,9 +866,11 @@ void VoiceAssistant::on_timer_event(const api::VoiceAssistantTimerEventResponse
|
||||
.is_active = msg.is_active,
|
||||
};
|
||||
this->timers_[timer.id] = timer;
|
||||
ESP_LOGD(TAG, "Timer Event");
|
||||
ESP_LOGD(TAG, " Type: %" PRId32, msg.event_type);
|
||||
ESP_LOGD(TAG, " %s", timer.to_string().c_str());
|
||||
ESP_LOGD(TAG,
|
||||
"Timer Event\n"
|
||||
" Type: %" PRId32 "\n"
|
||||
" %s",
|
||||
msg.event_type, timer.to_string().c_str());
|
||||
|
||||
switch (msg.event_type) {
|
||||
case api::enums::VOICE_ASSISTANT_TIMER_STARTED:
|
||||
|
||||
Reference in New Issue
Block a user