Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Fix API Server has deep sleep #386

Merged
merged 1 commit into from
Jan 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/esphomelib/api/api_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ void APIConnection::on_device_info_request_(const DeviceInfoRequest &req) {
buffer.encode_string(6, ARDUINO_BOARD);
#endif
#ifdef USE_DEEP_SLEEP
// bool has_deep_sleep = 8;
buffer.encode_bool(8, global_has_deep_sleep);
// bool has_deep_sleep = 7;
buffer.encode_bool(7, global_has_deep_sleep);
#endif
}, APIMessageType::DEVICE_INFO_RESPONSE);
}
Expand Down
3 changes: 2 additions & 1 deletion src/esphomelib/wifi_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void WiFiComponent::setup() {
this->wifi_apply_power_save_();

if (this->fast_connect_) {
this->start_connecting(this->sta_[0], false);
this->selected_ap_ = this->sta_[0];
this->start_connecting(this->selected_ap_, false);
} else {
this->start_scanning();
}
Expand Down