mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 01:34:18 +01:00
Fix improv
This commit is contained in:
parent
f6bd3ad344
commit
214bd354a0
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,9 @@ void ESP32ImprovComponent::setup() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
global_ble_server->on(BLEServerEvt::EmptyEvt::ON_DISCONNECT, [this](uint16_t conn_id) {
|
||||||
|
this->set_error_(improv::ERROR_NONE);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ESP32ImprovComponent::setup_characteristics() {
|
void ESP32ImprovComponent::setup_characteristics() {
|
||||||
|
@ -83,7 +86,6 @@ void ESP32ImprovComponent::loop() {
|
||||||
// Setup the service
|
// Setup the service
|
||||||
ESP_LOGD(TAG, "Creating Improv service");
|
ESP_LOGD(TAG, "Creating Improv service");
|
||||||
this->service_ = global_ble_server->create_service(ESPBTUUID::from_raw(improv::SERVICE_UUID), true);
|
this->service_ = global_ble_server->create_service(ESPBTUUID::from_raw(improv::SERVICE_UUID), true);
|
||||||
this->service_->on_client_disconnect([this](const uint16_t conn_id) { this->set_error_(improv::ERROR_NONE); });
|
|
||||||
this->setup_characteristics();
|
this->setup_characteristics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue