1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 03:42:20 +01:00

Add DNS to Text info (#4821)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Christian
2023-05-17 05:29:21 +01:00
committed by GitHub
parent 90598d2405
commit 0de47e2a4e
7 changed files with 44 additions and 0 deletions

View File

@@ -183,6 +183,11 @@ network::IPAddress WiFiComponent::get_ip_address() {
return this->wifi_soft_ap_ip();
return {};
}
network::IPAddress WiFiComponent::get_dns_address(int num) {
if (this->has_sta())
return this->wifi_dns_ip_(num);
return {};
}
std::string WiFiComponent::get_use_address() const {
if (this->use_address_.empty()) {
return App.get_name() + ".local";