mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 17:54:13 +01:00
Fix service setup
This commit is contained in:
parent
73b4b4059a
commit
0913772e26
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ BLEService *BLEServer::create_service(ESPBTUUID uuid, bool advertise, uint16_t n
|
|||
}
|
||||
BLEService *service = new BLEService(uuid, num_handles, inst_id, advertise); // NOLINT(cppcoreguidelines-owning-memory)
|
||||
this->services_.emplace(BLEServer::get_service_key(uuid, inst_id), service);
|
||||
if (this->is_running()) {
|
||||
if (this->parent_->is_active() && this->registered_) {
|
||||
service->do_create(this);
|
||||
}
|
||||
return service;
|
||||
|
|
Loading…
Reference in a new issue