Consider disconnected if wifi is disconnected
Trying to detect a disconnection earlier.
This commit is contained in:
@@ -191,7 +191,8 @@ script:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle relay if corresponding button action is enabled
|
// Toggle relay if corresponding button action is enabled
|
||||||
const bool api_disconnected = not global_api_server->is_connected();
|
const bool api_disconnected = !global_api_server->is_connected() or
|
||||||
|
!global_wifi_component->is_connected();
|
||||||
std::string select_state;
|
std::string select_state;
|
||||||
bool toggle_relay = false;
|
bool toggle_relay = false;
|
||||||
if (api_disconnected) {
|
if (api_disconnected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user