From 484674b85dd95ed0d7edadd0028fe6ead32f479b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 9 Aug 2026 13:29:00 -0500 Subject: [PATCH] Derive the bluedroid source-filter entry from the shared helper frameworks_for_platforms() gains its production caller in the same file as the platform registry; the derived set is identical to the hand list. --- esphome/components/bluetooth_connection/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/bluetooth_connection/__init__.py b/esphome/components/bluetooth_connection/__init__.py index 4bc92ed7eb..8c218c0954 100644 --- a/esphome/components/bluetooth_connection/__init__.py +++ b/esphome/components/bluetooth_connection/__init__.py @@ -9,7 +9,10 @@ from collections.abc import Awaitable, Callable from dataclasses import dataclass import esphome.codegen as cg -from esphome.config_helpers import filter_source_files_from_platform +from esphome.config_helpers import ( + filter_source_files_from_platform, + frameworks_for_platforms, +) import esphome.config_validation as cv from esphome.const import PLATFORM_ESP32, PLATFORM_RP2, PlatformFramework from esphome.core import CORE @@ -154,10 +157,7 @@ async def new_gatt_backend(config: ConfigType) -> cg.MockObj: # Named so tests can pin the hub entry against bluetooth_proxy's platform # list (this module cannot import bluetooth_proxy to derive it). SOURCE_FILE_FRAMEWORKS: dict[str, set[PlatformFramework]] = { - "bluetooth_connection_bluedroid.cpp": { - PlatformFramework.ESP32_ARDUINO, - PlatformFramework.ESP32_IDF, - }, + "bluetooth_connection_bluedroid.cpp": frameworks_for_platforms([PLATFORM_ESP32]), # Every hub platform the proxy admits (the file compiles empty where # USE_BLE_GATT_CLIENT is not defined), so a platform gaining a backend # cannot hit a missing-symbol trap here.