mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +01:00
Allow v1 connections to receive searching results.
This commit is contained in:
parent
d9398a91d1
commit
72ff2cfa68
@ -57,7 +57,11 @@ bool BluetoothProxy::parse_devices(esp_ble_gap_cb_param_t::ble_scan_result_evt_p
|
|||||||
}
|
}
|
||||||
ESP_LOGV(TAG, "Proxying %d packets", count);
|
ESP_LOGV(TAG, "Proxying %d packets", count);
|
||||||
this->api_connection_->send_bluetooth_le_raw_advertisements_response(resp);
|
this->api_connection_->send_bluetooth_le_raw_advertisements_response(resp);
|
||||||
return true;
|
bool searching = false;
|
||||||
|
for (auto *conn : this->connections_) {
|
||||||
|
searching |= conn->state() == espbt::ClientState::SEARCHING;
|
||||||
|
}
|
||||||
|
return !searching;
|
||||||
}
|
}
|
||||||
void BluetoothProxy::send_api_packet_(const esp32_ble_tracker::ESPBTDevice &device) {
|
void BluetoothProxy::send_api_packet_(const esp32_ble_tracker::ESPBTDevice &device) {
|
||||||
api::BluetoothLEAdvertisementResponse resp;
|
api::BluetoothLEAdvertisementResponse resp;
|
||||||
|
Loading…
Reference in New Issue
Block a user