Merge pull request #10466 from yaleman/mqttdiscoveryhost

Fixing MQTT Discovery Hostname
This commit is contained in:
Theo Arends 2021-01-09 10:24:56 +01:00 committed by GitHub
commit 16791ed4a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,10 +61,10 @@ void MqttDiscoverServer(void)
} }
} }
#endif // MDNS_HOSTNAME #endif // MDNS_HOSTNAME
SettingsUpdateText(SET_MQTT_HOST, MDNS.IP(i).toString().c_str()); SettingsUpdateText(SET_MQTT_HOST, MDNS.hostname(i).c_str());
Settings.mqtt_port = MDNS.port(i); Settings.mqtt_port = MDNS.port(i);
AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_MDNS D_MQTT_SERVICE_FOUND " %s, " D_IP_ADDRESS " %s, " D_PORT " %d"), MDNS.hostname(i).c_str(), SettingsText(SET_MQTT_HOST), Settings.mqtt_port); AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_MDNS D_MQTT_SERVICE_FOUND " %s," D_PORT " %d"), SettingsText(SET_MQTT_HOST), Settings.mqtt_port);
} }
} }
#endif // MQTT_HOST_DISCOVERY #endif // MQTT_HOST_DISCOVERY