diff --git a/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp b/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp index e102fe41c4..f6148a64f9 100644 --- a/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +++ b/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp @@ -58,12 +58,11 @@ void ESP32BLETracker::setup() { this->scanner_idle_ = true; #ifdef USE_OTA - ota_esphome::global_ota_component->add_on_state_callback( - [this](ota_esphome::OTAESPHomeState state, float progress, uint8_t error) { - if (state == ota_esphome::OTA_STARTED) { - this->stop_scan(); - } - }); + esphome::global_ota_component->add_on_state_callback([this](ota::OTAState state, float progress, uint8_t error) { + if (state == ota::OTA_STARTED) { + this->stop_scan(); + } + }); #endif }