mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Add friendly name in MDNS records if it is not empty (#4317)
This commit is contained in:
parent
f2eafa8fbe
commit
6d65671f92
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ void MDNSComponent::compile_records_() {
|
|||
service.service_type = "_esphomelib";
|
||||
service.proto = "_tcp";
|
||||
service.port = api::global_api_server->get_port();
|
||||
if (App.get_friendly_name().empty()) {
|
||||
if (!App.get_friendly_name().empty()) {
|
||||
service.txt_records.push_back({"friendly_name", App.get_friendly_name()});
|
||||
}
|
||||
service.txt_records.push_back({"version", ESPHOME_VERSION});
|
||||
|
|
Loading…
Reference in a new issue