[mdns] Support templatable config options for MDNS extra services (#8606)

This commit is contained in:
Nate Clark
2025-04-28 16:27:39 +12:00
committed by GitHub
parent fdc4ec8a57
commit 253e3ec6f6
9 changed files with 45 additions and 21 deletions
+4 -2
View File
@@ -121,9 +121,11 @@ void MDNSComponent::dump_config() {
ESP_LOGCONFIG(TAG, " Hostname: %s", this->hostname_.c_str());
ESP_LOGV(TAG, " Services:");
for (const auto &service : this->services_) {
ESP_LOGV(TAG, " - %s, %s, %d", service.service_type.c_str(), service.proto.c_str(), service.port);
ESP_LOGV(TAG, " - %s, %s, %d", service.service_type.c_str(), service.proto.c_str(),
const_cast<TemplatableValue<uint16_t> &>(service.port).value());
for (const auto &record : service.txt_records) {
ESP_LOGV(TAG, " TXT: %s = %s", record.key.c_str(), record.value.c_str());
ESP_LOGV(TAG, " TXT: %s = %s", record.key.c_str(),
const_cast<TemplatableValue<std::string> &>(record.value).value().c_str());
}
}
}