[dsmr] Eliminate heap allocation when publishing telegram (#13032)

This commit is contained in:
J. Nick Koston
2026-01-06 17:54:20 -10:00
committed by GitHub
parent 5b9be7c169
commit fb47bfe92a

View File

@@ -268,7 +268,7 @@ bool Dsmr::parse_telegram() {
// publish the telegram, after publishing the sensors so it can also trigger action based on latest values
if (this->s_telegram_ != nullptr) {
this->s_telegram_->publish_state(std::string(this->telegram_, this->bytes_read_));
this->s_telegram_->publish_state(this->telegram_, this->bytes_read_);
}
return true;
}