1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-16 06:45:48 +00:00

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

This commit is contained in:
Nate Clark
2025-04-28 00:27:39 -04:00
committed by GitHub
parent fdc4ec8a57
commit 253e3ec6f6
9 changed files with 45 additions and 21 deletions

View File

@@ -3,6 +3,7 @@
#ifdef USE_MDNS
#include <string>
#include <vector>
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
namespace esphome {
@@ -10,7 +11,7 @@ namespace mdns {
struct MDNSTXTRecord {
std::string key;
std::string value;
TemplatableValue<std::string> value;
};
struct MDNSService {
@@ -20,7 +21,7 @@ struct MDNSService {
// second label indicating protocol _including_ underscore character prefix
// as defined in RFC6763 Section 7, like "_tcp" or "_udp"
std::string proto;
uint16_t port;
TemplatableValue<uint16_t> port;
std::vector<MDNSTXTRecord> txt_records;
};