mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
preen
This commit is contained in:
@@ -123,9 +123,6 @@ async def to_code(config):
|
||||
if "api" in CORE.config:
|
||||
# Always: get_mac_address()
|
||||
dynamic_txt_count += 1
|
||||
# Conditional: friendly_name (if not empty)
|
||||
if CORE.friendly_name:
|
||||
dynamic_txt_count += 1
|
||||
# Conditional: dashboard_import_url
|
||||
if "dashboard_import" in CORE.config:
|
||||
dynamic_txt_count += 1
|
||||
|
||||
@@ -97,7 +97,7 @@ void MDNSComponent::compile_records_() {
|
||||
txt_records.reserve(txt_count);
|
||||
|
||||
if (!friendly_name_empty) {
|
||||
txt_records.push_back({MDNS_STR(TXT_FRIENDLY_NAME), MDNS_STR(this->add_dynamic_txt_value(friendly_name))});
|
||||
txt_records.push_back({MDNS_STR(TXT_FRIENDLY_NAME), MDNS_STR(friendly_name.c_str())});
|
||||
}
|
||||
txt_records.push_back({MDNS_STR(TXT_VERSION), MDNS_STR(ESPHOME_VERSION)});
|
||||
txt_records.push_back({MDNS_STR(TXT_MAC), MDNS_STR(this->add_dynamic_txt_value(get_mac_address()))});
|
||||
|
||||
Reference in New Issue
Block a user