Point the slot range message at rp2040_ble and explain the import split

This commit is contained in:
J. Nick Koston
2026-08-10 17:14:24 -05:00
parent 6ceca44023
commit ff3e14099c
2 changed files with 7 additions and 4 deletions
@@ -106,8 +106,11 @@ async def _rp2_register(backend: cg.MockObj, config: ConfigType) -> None:
@dataclass(frozen=True)
class _PlatformBackend:
"""One platform's backend: codegen class, extra schema keys (lazy so the
platform stack is only imported when targeted), and stack registration."""
"""One platform's backend: codegen class, extra schema keys, and stack
registration. The esp32 fragments import their stack lazily because those
imports register esp32-only automations as a side effect; rp2040_ble is
side-effect-free, so it is imported at module scope (the cap constant
needs it there anyway)."""
backend_class: cg.MockObjClass
schema_fragment: Callable[[], cv.Schema]
@@ -185,8 +185,8 @@ def _rp2_config_schema() -> cv.All:
min=1,
max=max_conn,
msg=f"rp2 supports at most {max_conn} connection slot(s); "
"the BTstack pool overrides in bluetooth_connection "
f"are sized for {max_conn}",
"the BTstack pool overrides in rp2040_ble are sized "
f"for {max_conn}",
),
),
}