Files
esphome/tests/components/bthome_ble
Claude d6ee57a7b9 [bthome_ble] Refactor to list-based sensor configuration
Refactored the component to use a list-based configuration structure that
reduces duplication and makes it clearer that multiple sensors come from
the same device.

New configuration format:

sensor:
  - platform: bthome_ble
    mac_address: "A4:C1:38:12:34:56"
    bindkey: "..." # optional
    sensors:
      - type: temperature
        name: "Temperature"
      - type: humidity
        name: "Humidity"

binary_sensor:
  - platform: bthome_ble
    mac_address: "A4:C1:38:9A:BC:DE"
    binary_sensors:
      - type: motion
        name: "Motion"
      - type: door
        name: "Door"

Benefits:
- MAC address and bind key are specified once per device
- More efficient (one BLE listener per device instead of per sensor)
- Clearer relationship between sensors from the same device
- Matches user expectations for multi-sensor devices

Updated test configurations to demonstrate the new format.
2025-11-18 20:36:06 +00:00
..