1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

Merge branch 'bluetooth_proxy_heap' into integration

This commit is contained in:
J. Nick Koston
2025-07-17 12:59:43 -10:00
4 changed files with 45 additions and 4 deletions

View File

@@ -16,6 +16,9 @@ template<typename... X> class TemplatableStringValue : public TemplatableValue<s
template<typename T> static std::string value_to_string(T &&val) { return to_string(std::forward<T>(val)); }
// Overloads for string types - needed because std::to_string doesn't support them
static std::string value_to_string(char *val) {
return val ? std::string(val) : std::string();
} // For lambdas returning char* (e.g., itoa)
static std::string value_to_string(const char *val) { return std::string(val); } // For lambdas returning .c_str()
static std::string value_to_string(const std::string &val) { return val; }
static std::string value_to_string(std::string &&val) { return std::move(val); }

View File

@@ -134,7 +134,7 @@ void BluetoothProxy::flush_pending_advertisements() {
}
// Send the message
this->api_connection_->send_message(*this->response_);
this->api_connection_->send_message(*this->response_, api::BluetoothLERawAdvertisementsResponse::MESSAGE_TYPE);
// Reset count - existing items will be overwritten in next batch
this->advertisement_count_ = 0;