diff --git a/esphome/components/wifi_info/wifi_info_text_sensor.cpp b/esphome/components/wifi_info/wifi_info_text_sensor.cpp index 283b876b5d..0f96d89737 100644 --- a/esphome/components/wifi_info/wifi_info_text_sensor.cpp +++ b/esphome/components/wifi_info/wifi_info_text_sensor.cpp @@ -2,7 +2,7 @@ #include "esphome/core/log.h" namespace esphome { -namespace wifi_info_text_sensor { +namespace wifi_info { static const char *TAG = "wifi_info"; @@ -10,5 +10,5 @@ void IPAddressWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo I void SSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); } void BSSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); } -} // namespace wifi_info_text_sensor +} // namespace wifi_info } // namespace esphome diff --git a/esphome/components/wifi_info/wifi_info_text_sensor.h b/esphome/components/wifi_info/wifi_info_text_sensor.h index 47aa68ea0f..9dfa684b4b 100644 --- a/esphome/components/wifi_info/wifi_info_text_sensor.h +++ b/esphome/components/wifi_info/wifi_info_text_sensor.h @@ -18,6 +18,7 @@ class IPAddressWiFiInfo : public Component, public text_sensor::TextSensor { } float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } std::string unique_id() override { return get_mac_address() + "-wifiinfo-ip"; } + void dump_config() override; protected: IPAddress last_ip_; @@ -34,6 +35,7 @@ class SSIDWiFiInfo : public Component, public text_sensor::TextSensor { } float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } std::string unique_id() override { return get_mac_address() + "-wifiinfo-ssid"; } + void dump_config() override; protected: std::string last_ssid_; @@ -52,6 +54,7 @@ class BSSIDWiFiInfo : public Component, public text_sensor::TextSensor { } float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } std::string unique_id() override { return get_mac_address() + "-wifiinfo-bssid"; } + void dump_config() override; protected: wifi::bssid_t last_bssid_;