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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user