1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 15:26:01 +00:00
This commit is contained in:
J. Nick Koston
2025-11-06 17:49:45 -06:00
parent d96e8a9c4b
commit d6528f906e
2 changed files with 4 additions and 5 deletions

View File

@@ -343,10 +343,6 @@ void WiFiComponent::set_sta(const WiFiAP &ap) {
this->add_sta(ap);
this->selected_sta_index_ = 0;
}
void WiFiComponent::clear_sta() {
this->sta_.clear();
this->selected_sta_index_ = -1;
}
WiFiAP WiFiComponent::build_wifi_ap_from_selected_() const {
// PRECONDITION: selected_sta_index_ must be valid (ensured by all callers)

View File

@@ -222,7 +222,10 @@ class WiFiComponent : public Component {
WiFiAP get_sta() const;
void init_sta(size_t count);
void add_sta(const WiFiAP &ap);
void clear_sta();
void clear_sta() {
this->sta_.clear();
this->selected_sta_index_ = -1;
}
#ifdef USE_WIFI_AP
/** Setup an Access Point that should be created if no connection to a station can be made.