[ble_device_base] Migrate BLE sensor platforms to the neutral layer (batch 2: atc_mithermometer, pvvx_mithermometer, bthome_mithermometer) (#17950)

This commit is contained in:
Edvard Filistovič
2026-08-07 12:48:18 -05:00
committed by GitHub
parent b326cefea7
commit 77bfda6f1f
25 changed files with 177 additions and 95 deletions
@@ -0,0 +1,7 @@
sensor:
- platform: atc_mithermometer
mac_address: A4:C1:38:4E:16:78
temperature:
name: ATC Temperature
humidity:
name: ATC Humidity
@@ -1,7 +1,10 @@
esp32_ble_tracker:
id: ble_tracker_hub
sensor:
# Explicit ble_hub_id: pins the neutral binding as a declared key.
- platform: atc_mithermometer
ble_hub_id: ble_tracker_hub
mac_address: A4:C1:38:4E:16:78
temperature:
name: ATC Temperature
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
atc_mithermometer: !include common-ln.yaml
@@ -0,0 +1,10 @@
# The esp32_ble_id -> ble_hub_id alias (removal 2027.2.0) still validates.
esp32_ble_tracker:
id: ble_tracker_hub
sensor:
- platform: atc_mithermometer
esp32_ble_id: ble_tracker_hub
mac_address: A4:C1:38:4E:16:78
temperature:
name: ATC Legacy Key Temperature
@@ -0,0 +1,17 @@
# Config-only: the CI base board (generic-bk7252, BLE 4.2) cannot compile the
# BLE 5.x tracker, so this fixture proves validation (schema + neutral binding)
# on a non-esp32 platform; codegen and compilation are not exercised here.
bk72xx_ble_tracker:
id: ble_hub
sensor:
- platform: atc_mithermometer
ble_hub_id: ble_hub
mac_address: A4:C1:38:4E:16:78
temperature:
name: BK ATC Temperature
# No ble_hub_id: exercises the generated binding real configs use.
- platform: atc_mithermometer
mac_address: A4:C1:38:4E:16:79
temperature:
name: BK ATC Implicit Temperature
@@ -0,0 +1,9 @@
sensor:
- platform: bthome_mithermometer
mac_address: A4:C1:38:4E:16:78
# bindkey compiles ble_device_base::aes_ccm_auth_decrypt off Espressif
bindkey: eef418daf699a0c188f3bfd17e4565d9
temperature:
name: BTHome Temperature
humidity:
name: BTHome Humidity
@@ -1,7 +1,10 @@
esp32_ble_tracker:
id: ble_tracker_hub
sensor:
# Explicit ble_hub_id: pins the neutral binding as a declared key.
- platform: bthome_mithermometer
ble_hub_id: ble_tracker_hub
mac_address: A4:C1:38:4E:16:78
bindkey: eef418daf699a0c188f3bfd17e4565d9
temperature:
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
bthome_mithermometer: !include common-ln.yaml
@@ -0,0 +1,18 @@
# Config-only: the CI base board (generic-bk7252, BLE 4.2) cannot compile the
# BLE 5.x tracker, so this fixture proves validation (schema + neutral binding)
# on a non-esp32 platform; codegen and compilation are not exercised here.
bk72xx_ble_tracker:
id: ble_hub
sensor:
- platform: bthome_mithermometer
ble_hub_id: ble_hub
mac_address: A4:C1:38:4E:16:78
bindkey: eef418daf699a0c188f3bfd17e4565d9
temperature:
name: BK BTHome Temperature
# No ble_hub_id: exercises the generated binding real configs use.
- platform: bthome_mithermometer
mac_address: A4:C1:38:4E:16:79
temperature:
name: BK BTHome Implicit Temperature
@@ -0,0 +1,8 @@
# Sensor only: the pvvx display is a GATT client and stays ESP32-only.
sensor:
- platform: pvvx_mithermometer
mac_address: A4:C1:38:4E:16:78
temperature:
name: PVVX Temperature
humidity:
name: PVVX Humidity
@@ -3,6 +3,7 @@ wifi:
password: password1
esp32_ble_tracker:
id: ble_tracker_hub
ble_client:
- mac_address: 01:02:03:04:05:06
@@ -26,7 +27,9 @@ display:
it.print_battery(true);
sensor:
# Explicit ble_hub_id: pins the neutral binding as a declared key.
- platform: pvvx_mithermometer
ble_hub_id: ble_tracker_hub
mac_address: A4:C1:38:4E:16:78
temperature:
name: PVVX Temperature
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
pvvx_mithermometer: !include common-ln.yaml
@@ -0,0 +1,13 @@
# Config-only: the CI base board (generic-bk7252, BLE 4.2) cannot compile the
# BLE 5.x tracker, so this fixture proves validation (schema + neutral binding)
# on a non-esp32 platform; codegen and compilation are not exercised here. The display platform is excluded: it needs ble_client
# (GATT), which only the esp32 tracker stack provides.
bk72xx_ble_tracker:
id: ble_hub
sensor:
- platform: pvvx_mithermometer
ble_hub_id: ble_hub
mac_address: A4:C1:38:4E:16:78
temperature:
name: BK PVVX Temperature