mirror of
https://github.com/esphome/esphome.git
synced 2026-08-17 10:52:56 +08:00
[ble_device_base] Migrate BLE sensor platforms to the neutral layer (batch 12: xiaomi_miscale, xiaomi_mjyd02yla, xiaomi_mue4094rt) (#18180)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
sensor:
|
||||
- platform: xiaomi_miscale
|
||||
mac_address: '5C:CA:D3:70:D4:A2'
|
||||
weight:
|
||||
name: "Xiaomi Mi Scale Weight"
|
||||
impedance:
|
||||
name: "Xiaomi Mi Scale Impedance"
|
||||
@@ -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: xiaomi_miscale
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: '5C:CA:D3:70:D4:A2'
|
||||
weight:
|
||||
name: "Xiaomi Mi Scale Weight"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_miscale: !include common-ln.yaml
|
||||
@@ -0,0 +1,20 @@
|
||||
# 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_tracker_hub
|
||||
|
||||
sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_miscale
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: '5C:CA:D3:70:D4:A2'
|
||||
weight:
|
||||
name: "Xiaomi Mi Scale Weight"
|
||||
impedance:
|
||||
name: "Xiaomi Mi Scale Impedance"
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- platform: xiaomi_miscale
|
||||
mac_address: '5C:CA:D3:70:D4:A3'
|
||||
weight:
|
||||
name: "BK Xiaomi Mi Scale Implicit Weight"
|
||||
@@ -0,0 +1,11 @@
|
||||
binary_sensor:
|
||||
- platform: xiaomi_mjyd02yla
|
||||
name: MJYD02YL-A Motion
|
||||
mac_address: 50:EC:50:CD:32:02
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
idle_time:
|
||||
name: MJYD02YL-A Idle Time
|
||||
light:
|
||||
name: MJYD02YL-A Light Status
|
||||
battery_level:
|
||||
name: MJYD02YL-A Battery Level
|
||||
@@ -1,7 +1,10 @@
|
||||
esp32_ble_tracker:
|
||||
id: ble_tracker_hub
|
||||
|
||||
binary_sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_mjyd02yla
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: MJYD02YL-A Motion
|
||||
mac_address: 50:EC:50:CD:32:02
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_mjyd02yla: !include common-ln.yaml
|
||||
@@ -0,0 +1,24 @@
|
||||
# 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_tracker_hub
|
||||
|
||||
binary_sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_mjyd02yla
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: MJYD02YL-A Motion
|
||||
mac_address: 50:EC:50:CD:32:02
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
idle_time:
|
||||
name: MJYD02YL-A Idle Time
|
||||
light:
|
||||
name: MJYD02YL-A Light Status
|
||||
battery_level:
|
||||
name: MJYD02YL-A Battery Level
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- platform: xiaomi_mjyd02yla
|
||||
name: BK MJYD02YL-A Implicit Motion
|
||||
mac_address: 50:EC:50:CD:32:03
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
@@ -0,0 +1,5 @@
|
||||
binary_sensor:
|
||||
- platform: xiaomi_mue4094rt
|
||||
name: MUE4094RT Motion
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
timeout: 5s
|
||||
@@ -1,7 +1,10 @@
|
||||
esp32_ble_tracker:
|
||||
id: ble_tracker_hub
|
||||
|
||||
binary_sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_mue4094rt
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: MUE4094RT Motion
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
timeout: 5s
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_mue4094rt: !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_tracker_hub
|
||||
|
||||
binary_sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_mue4094rt
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: MUE4094RT Motion
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
timeout: 5s
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- platform: xiaomi_mue4094rt
|
||||
name: BK MUE4094RT Implicit Motion
|
||||
mac_address: 7A:80:8E:19:36:BB
|
||||
timeout: 5s
|
||||
Reference in New Issue
Block a user