30 std::string scan_results;
32 if (scan.get_is_hidden())
35 scan_results += scan.get_ssid();
38 scan_results +=
"dB\n";
41 if (this->last_scan_results_ != scan_results) {
42 this->last_scan_results_ = scan_results;
60 if (this->last_ssid_ != ssid) {
61 this->last_ssid_ = ssid;
77 if (memcmp(bssid.data(), last_bssid_.data(), 6) != 0) {
78 std::copy(bssid.begin(), bssid.end(), last_bssid_.begin());
80 sprintf(buf,
"%02X:%02X:%02X:%02X:%02X:%02X", bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
wifi::bssid_t last_bssid_
network::IPAddress last_ip_
float get_setup_priority() const override
std::array< uint8_t, 6 > bssid_t
std::string unique_id() override
const float AFTER_WIFI
For components that should be initialized after WiFi is connected.
This class simplifies creating components that periodically check a state.
void publish_state(const std::string &state)
std::string unique_id() override
std::string unique_id() override
float get_setup_priority() const override
std::string unique_id() override
std::string get_mac_address()
Get the device MAC address as a string, in lowercase hex notation.
WiFiComponent * global_wifi_component
float get_setup_priority() const override
std::string to_string(int value)
std::string unique_id() override
float get_setup_priority() const override
std::string last_scan_results_
std::string get_mac_address_pretty()
Get the device MAC address as a string, in colon-separated uppercase hex notation.
network::IPAddress wifi_sta_ip()
void dump_config() override