1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 15:55:46 +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 GitHub
parent 5bbc2ab482
commit 5ca407e27c
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)));
}
}
}