From 47aaa21f8dc46d499966c3bc7ac314dfd4a3064a Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 3 Sep 2026 07:28:23 +1200 Subject: [PATCH] Apply advertising requests once BLE becomes active A component that requests advertising during setup does so before the stack is up, so the request had no effect until something else restarted advertising. Refresh on the transition to active so early requests, and requests still held across a disable/enable cycle, take effect right away. --- esphome/components/esp32_ble/ble.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/components/esp32_ble/ble.cpp b/esphome/components/esp32_ble/ble.cpp index f27a0483e2..82d588475d 100644 --- a/esphome/components/esp32_ble/ble.cpp +++ b/esphome/components/esp32_ble/ble.cpp @@ -592,6 +592,10 @@ void ESP32BLE::loop_handle_state_transition_not_active_() { } this->state_ = BLE_COMPONENT_STATE_ACTIVE; +#ifdef USE_ESP32_BLE_ADVERTISING + // Requests made before the stack was up (or before it was re-enabled) take effect now + this->advertising_refresh(); +#endif } }