From b378038253f7a015cadf36fc4407ecde3f9774ff Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 18 Oct 2025 20:05:22 -1000 Subject: [PATCH] [esp32_ble_client] Remove duplicate MAC address extraction in set_address() --- esphome/components/esp32_ble_client/ble_client_base.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/esphome/components/esp32_ble_client/ble_client_base.h b/esphome/components/esp32_ble_client/ble_client_base.h index f2edd6c2b3..7f0ae3b83e 100644 --- a/esphome/components/esp32_ble_client/ble_client_base.h +++ b/esphome/components/esp32_ble_client/ble_client_base.h @@ -61,12 +61,7 @@ class BLEClientBase : public espbt::ESPBTClient, public Component { this->address_str_ = ""; } else { char buf[18]; - uint8_t mac[6] = { - (uint8_t) ((this->address_ >> 40) & 0xff), (uint8_t) ((this->address_ >> 32) & 0xff), - (uint8_t) ((this->address_ >> 24) & 0xff), (uint8_t) ((this->address_ >> 16) & 0xff), - (uint8_t) ((this->address_ >> 8) & 0xff), (uint8_t) ((this->address_ >> 0) & 0xff), - }; - format_mac_addr_upper(mac, buf); + format_mac_addr_upper(this->remote_bda_, buf); this->address_str_ = buf; } }