From e6ca3afd562e3945a645e41ab15123a0141fa211 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 27 Sep 2025 11:09:10 -0500 Subject: [PATCH] preen --- esphome/components/esp32_ble/ble.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/esphome/components/esp32_ble/ble.cpp b/esphome/components/esp32_ble/ble.cpp index db16e12ae2..2108ded472 100644 --- a/esphome/components/esp32_ble/ble.cpp +++ b/esphome/components/esp32_ble/ble.cpp @@ -81,18 +81,9 @@ void ESP32BLE::advertising_set_service_data_and_name(std::span da // when changing both properties, avoiding the brief gap that would occur with separate calls. this->advertising_init_(); - bool needs_restart = false; - this->advertising_->set_service_data(data); - - if (this->advertising_->get_include_name() != include_name) { - this->advertising_->set_include_name(include_name); - needs_restart = true; - } - - if (needs_restart || !data.empty()) { - this->advertising_start(); - } + this->advertising_->set_include_name(include_name); + this->advertising_start(); } void ESP32BLE::advertising_register_raw_advertisement_callback(std::function &&callback) {