From 1f33ad037d42ae2522cc4075e04fb5794703a5cd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 22 Nov 2022 14:46:59 -0600 Subject: [PATCH] Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069) --- esphome/components/esp32_ble_client/ble_client_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/esp32_ble_client/ble_client_base.cpp b/esphome/components/esp32_ble_client/ble_client_base.cpp index 3579d93c5a..964ff29771 100644 --- a/esphome/components/esp32_ble_client/ble_client_base.cpp +++ b/esphome/components/esp32_ble_client/ble_client_base.cpp @@ -299,7 +299,7 @@ BLEDescriptor *BLEClientBase::get_config_descriptor(uint16_t handle) { auto *chr = this->get_characteristic(handle); if (chr != nullptr) { for (auto &desc : chr->descriptors) { - if (desc->uuid == espbt::ESPBTUUID::from_uint16(0x2902)) + if (desc->uuid.get_uuid().uuid.uuid16 == 0x2902) return desc; } }