mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Add messages when WiFi and Ethernet components set 'warning' flag. (#6850)
This commit is contained in:
parent
2beb1f0336
commit
2353b2b5e1
2 changed files with 4 additions and 4 deletions
|
@ -410,7 +410,7 @@ void EthernetComponent::start_connect_() {
|
||||||
global_eth_component->ipv6_count_ = 0;
|
global_eth_component->ipv6_count_ = 0;
|
||||||
#endif /* USE_NETWORK_IPV6 */
|
#endif /* USE_NETWORK_IPV6 */
|
||||||
this->connect_begin_ = millis();
|
this->connect_begin_ = millis();
|
||||||
this->status_set_warning();
|
this->status_set_warning("waiting for IP configuration");
|
||||||
|
|
||||||
esp_err_t err;
|
esp_err_t err;
|
||||||
err = esp_netif_set_hostname(this->eth_netif_, App.get_name().c_str());
|
err = esp_netif_set_hostname(this->eth_netif_, App.get_name().c_str());
|
||||||
|
|
|
@ -135,7 +135,7 @@ void WiFiComponent::loop() {
|
||||||
|
|
||||||
switch (this->state_) {
|
switch (this->state_) {
|
||||||
case WIFI_COMPONENT_STATE_COOLDOWN: {
|
case WIFI_COMPONENT_STATE_COOLDOWN: {
|
||||||
this->status_set_warning();
|
this->status_set_warning("waiting to reconnect");
|
||||||
if (millis() - this->action_started_ > 5000) {
|
if (millis() - this->action_started_ > 5000) {
|
||||||
if (this->fast_connect_ || this->retry_hidden_) {
|
if (this->fast_connect_ || this->retry_hidden_) {
|
||||||
this->start_connecting(this->sta_[0], false);
|
this->start_connecting(this->sta_[0], false);
|
||||||
|
@ -146,13 +146,13 @@ void WiFiComponent::loop() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WIFI_COMPONENT_STATE_STA_SCANNING: {
|
case WIFI_COMPONENT_STATE_STA_SCANNING: {
|
||||||
this->status_set_warning();
|
this->status_set_warning("scanning for networks");
|
||||||
this->check_scanning_finished();
|
this->check_scanning_finished();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WIFI_COMPONENT_STATE_STA_CONNECTING:
|
case WIFI_COMPONENT_STATE_STA_CONNECTING:
|
||||||
case WIFI_COMPONENT_STATE_STA_CONNECTING_2: {
|
case WIFI_COMPONENT_STATE_STA_CONNECTING_2: {
|
||||||
this->status_set_warning();
|
this->status_set_warning("associating to network");
|
||||||
this->check_connecting_finished();
|
this->check_connecting_finished();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue