Implement Improv via Serial component (#2423)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Jesse Hills
2021-11-11 08:55:45 +13:00
committed by GitHub
parent 0bdb48bcac
commit 5ff7c8418c
17 changed files with 391 additions and 14 deletions
+2 -1
View File
@@ -140,7 +140,8 @@ def final_validate(config):
has_sta = bool(config.get(CONF_NETWORKS, True))
has_ap = CONF_AP in config
has_improv = "esp32_improv" in fv.full_config.get()
if (not has_sta) and (not has_ap) and (not has_improv):
has_improv_serial = "improv_serial" in fv.full_config.get()
if not (has_sta or has_ap or has_improv or has_improv_serial):
raise cv.Invalid(
"Please specify at least an SSID or an Access Point to create."
)
@@ -239,8 +239,6 @@ void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &pa
sta.set_ssid(ssid);
sta.set_password(password);
this->set_sta(sta);
this->start_scanning();
}
void WiFiComponent::start_connecting(const WiFiAP &ap, bool two) {