[ble_device_base] Migrate BLE sensor platforms to the neutral layer (batch 3: mopeka_ble, mopeka_pro_check, mopeka_std_check) (#17951)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Edvard Filistovič
2026-08-07 12:59:27 -05:00
committed by GitHub
co-authored by J. Nick Koston
parent d7b5ad77da
commit 715b14aeba
21 changed files with 119 additions and 63 deletions
@@ -0,0 +1 @@
mopeka_ble:
+3
View File
@@ -1,3 +1,6 @@
esp32_ble_tracker:
id: ble_tracker_hub
# Explicit ble_hub_id: pins the neutral binding as a declared key.
mopeka_ble:
ble_hub_id: ble_tracker_hub
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
mopeka_ble: !include common-ln.yaml
@@ -0,0 +1,8 @@
# 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
mopeka_ble:
ble_hub_id: ble_hub
@@ -0,0 +1,8 @@
sensor:
- platform: mopeka_pro_check
mac_address: D3:75:F2:DC:16:91
tank_type: 20LB_V
temperature:
name: Propane test temp
level:
name: Propane test level
@@ -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: mopeka_pro_check
ble_hub_id: ble_tracker_hub
mac_address: D3:75:F2:DC:16:91
tank_type: CUSTOM
custom_distance_full: 40cm
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
mopeka_pro_check: !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.
bk72xx_ble_tracker:
id: ble_hub
sensor:
- platform: mopeka_pro_check
ble_hub_id: ble_hub
mac_address: D3:75:F2:DC:16:91
tank_type: 20lb_v
level:
name: BK Mopeka Pro Level
@@ -0,0 +1,8 @@
sensor:
- platform: mopeka_std_check
mac_address: D3:75:F2:DC:16:91
tank_type: Europe_11kg
temperature:
name: Propane test temp
level:
name: Propane test level
@@ -1,8 +1,11 @@
esp32_ble_tracker:
id: ble_tracker_hub
sensor:
# Example using 11kg 100% propane tank.
# Explicit ble_hub_id: pins the neutral binding as a declared key.
- platform: mopeka_std_check
ble_hub_id: ble_tracker_hub
mac_address: D3:75:F2:DC:16:91
tank_type: Europe_11kg
temperature:
@@ -0,0 +1,3 @@
packages:
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
mopeka_std_check: !include common-ln.yaml
@@ -0,0 +1,19 @@
# 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: mopeka_std_check
ble_hub_id: ble_hub
mac_address: D3:75:F2:DC:16:91
tank_type: Europe_11kg
level:
name: BK Mopeka Std Level
# No ble_hub_id: exercises the generated binding real configs use.
- platform: mopeka_std_check
mac_address: D3:75:F2:DC:16:92
tank_type: Europe_11kg
level:
name: BK Propane implicit level