1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-11 15:38:19 +00:00
esphome/esphome/components/wifi_info/wifi_info_text_sensor.cpp
Gustavo Ambrozio 8bebf138ee
Wifi scan results (#1605)
* adding a scan results wifi text sensor

* Code comment

* Adding scan results to test

* Removing redundant call

* linting

* Better method to update wifi info

Co-authored-by: Otto Winter <otto@otto-winter.com>

* Getting loop back

At least for now.

* Trying out suggestion again

* Applying cr suggestions

Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-09-22 13:44:09 +02:00

17 lines
650 B
C++

#include "wifi_info_text_sensor.h"
#include "esphome/core/log.h"
namespace esphome {
namespace wifi_info {
static const char *const TAG = "wifi_info";
void IPAddressWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); }
void ScanResultsWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo Scan Results", this); }
void SSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); }
void BSSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); }
void MacAddressWifiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo Mac Address", this); }
} // namespace wifi_info
} // namespace esphome