Clean up iteration residue from the review rounds

- Drop unused includes (ble_client_state.h, <utility>) and the unused
  notify/indicate property constants (no CCCD path yet)
- Note the frozen node-facing surface on the uncalled backend forwarders
- Keep the legacy-only 'name' key out of the neutral schema
- Move the slot-ledger test to tests/component_tests/bluetooth_connection
- Comment accuracy fixes (choke-point wording, wrapped lines, backoff note)
This commit is contained in:
J. Nick Koston
2026-08-09 09:31:21 -05:00
parent 13de0275c8
commit 7cb32f9546
9 changed files with 29 additions and 23 deletions
@@ -0,0 +1,17 @@
"""Tests for the cross-component GATT slot ledger."""
import pytest
from esphome import config_validation as cv
from esphome.components import bluetooth_connection
from esphome.const import KEY_CORE, KEY_TARGET_PLATFORM, PLATFORM_RP2
from esphome.core import CORE
def test_gatt_slot_ledger_rejects_overcommit_on_rp2() -> None:
# The cross-component cap must reject two claims on rp2.
CORE.data.setdefault(KEY_CORE, {})[KEY_TARGET_PLATFORM] = PLATFORM_RP2
bluetooth_connection.consume_gatt_slot("bluetooth_proxy")({})
bluetooth_connection.consume_gatt_slot("ble_client")({})
with pytest.raises(cv.Invalid, match="supports at most 1 GATT client"):
bluetooth_connection.FINAL_VALIDATE_SCHEMA({})