20 for (
auto &ip : ips) {
46 std::string dns_results = dns_one.
str() +
" " + dns_two.str();
48 if (dns_results != this->last_results_) {
49 this->last_results_ = dns_results;
64 std::string scan_results;
66 if (scan.get_is_hidden())
69 scan_results += scan.get_ssid();
72 scan_results +=
"dB\n";
75 if (this->last_scan_results_ != scan_results) {
76 this->last_scan_results_ = scan_results;
94 if (this->last_ssid_ != ssid) {
95 this->last_ssid_ = ssid;
111 if (memcmp(bssid.data(), last_bssid_.data(), 6) != 0) {
112 std::copy(bssid.begin(), bssid.end(), last_bssid_.begin());
114 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_
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.
network::IPAddresses wifi_sta_ip_addresses()
float get_setup_priority() const override
std::string unique_id() override
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.
std::array< text_sensor::TextSensor *, 5 > ip_sensors_
WiFiComponent * global_wifi_component
network::IPAddress get_dns_address(int num)
std::array< IPAddress, 5 > IPAddresses
float get_setup_priority() const override
std::string last_results_
std::string to_string(int value)
std::string unique_id() override
float get_setup_priority() const override
Implementation of SPI Controller mode.
network::IPAddresses last_ips_
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.
void dump_config() override
esphome::sensor::Sensor * sensor
void add_ip_sensors(uint8_t index, text_sensor::TextSensor *s)