expose mac address via discovery (#1038)

This commit is contained in:
Chris Talkington 2020-05-23 20:53:15 -05:00 committed by GitHub
parent 021055f0b8
commit 39fbf9c56f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,7 @@ void network_setup_mdns(IPAddress address, int interface) {
// DNS-SD (!=mDNS !) requires at least one TXT record for service discovery - let's add version
MDNS.addServiceTxt("esphomelib", "tcp", "version", ESPHOME_VERSION);
MDNS.addServiceTxt("esphomelib", "tcp", "address", network_get_address().c_str());
MDNS.addServiceTxt("esphomelib", "tcp", "mac", get_mac_address().c_str());
} else {
#endif
// Publish "http" service if not using native API.