1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00

[mdns] Store TXT record values in flash to reduce heap usage (#11114)

This commit is contained in:
J. Nick Koston
2025-10-09 10:01:58 -10:00
committed by Jesse Hills
parent a2cb415dfa
commit 842cb9033a
12 changed files with 119 additions and 93 deletions

View File

@@ -33,7 +33,7 @@ void MDNSComponent::setup() {
MDNS.addService(FPSTR(service_type), FPSTR(proto), port);
for (const auto &record : service.txt_records) {
MDNS.addServiceTxt(FPSTR(service_type), FPSTR(proto), FPSTR(MDNS_STR_ARG(record.key)),
const_cast<TemplatableValue<std::string> &>(record.value).value().c_str());
FPSTR(MDNS_STR_ARG(record.value)));
}
}
}