mirror of
https://github.com/esphome/esphome.git
synced 2026-08-23 06:36:23 +00:00
[ble_device_base] Migrate BLE sensor platforms to the neutral layer (batch 13: xiaomi_rtcgq02lm, xiaomi_wx08zm, xiaomi_xmwsdj04mmc) (#18183)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
xiaomi_rtcgq02lm:
|
||||
- id: motion_rtcgq02lm
|
||||
mac_address: 01:02:03:04:05:06
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
|
||||
binary_sensor:
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
motion:
|
||||
name: Mi Motion Sensor 2
|
||||
light:
|
||||
name: Mi Motion Sensor 2 Light
|
||||
button:
|
||||
name: Mi Motion Sensor 2 Button
|
||||
|
||||
sensor:
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
battery_level:
|
||||
name: Mi Motion Sensor 2 Battery level
|
||||
@@ -1,7 +1,10 @@
|
||||
esp32_ble_tracker:
|
||||
id: ble_tracker_hub
|
||||
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
xiaomi_rtcgq02lm:
|
||||
- id: motion_rtcgq02lm
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: 01:02:03:04:05:06
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_rtcgq02lm: !include common-ln.yaml
|
||||
@@ -0,0 +1,32 @@
|
||||
# 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
|
||||
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
xiaomi_rtcgq02lm:
|
||||
- id: motion_rtcgq02lm
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: 01:02:03:04:05:06
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- id: motion_rtcgq02lm_implicit
|
||||
mac_address: 01:02:03:04:05:07
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
binary_sensor:
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
motion:
|
||||
name: Mi Motion Sensor 2
|
||||
light:
|
||||
name: Mi Motion Sensor 2 Light
|
||||
button:
|
||||
name: Mi Motion Sensor 2 Button
|
||||
|
||||
sensor:
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
battery_level:
|
||||
name: Mi Motion Sensor 2 Battery level
|
||||
@@ -0,0 +1,8 @@
|
||||
binary_sensor:
|
||||
- platform: xiaomi_wx08zm
|
||||
name: WX08ZM Activation State
|
||||
mac_address: 74:a3:4a:b5:07:34
|
||||
tablet:
|
||||
name: WX08ZM Tablet Resource
|
||||
battery_level:
|
||||
name: WX08ZM 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_wx08zm
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: WX08ZM Activation State
|
||||
mac_address: 74:a3:4a:b5:07:34
|
||||
tablet:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_wx08zm: !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
|
||||
|
||||
binary_sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_wx08zm
|
||||
ble_hub_id: ble_tracker_hub
|
||||
name: WX08ZM Activation State
|
||||
mac_address: 74:a3:4a:b5:07:34
|
||||
tablet:
|
||||
name: WX08ZM Tablet Resource
|
||||
battery_level:
|
||||
name: WX08ZM Battery Level
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- platform: xiaomi_wx08zm
|
||||
name: BK WX08ZM Implicit Activation State
|
||||
mac_address: 74:a3:4a:b5:07:35
|
||||
@@ -0,0 +1,10 @@
|
||||
sensor:
|
||||
- platform: xiaomi_xmwsdj04mmc
|
||||
mac_address: 84:B4:DB:5D:A3:8F
|
||||
bindkey: d8ca2ed09bb5541dc8f045ca360b00ea
|
||||
temperature:
|
||||
name: Xiaomi XMWSDJ04MMC Temperature
|
||||
humidity:
|
||||
name: Xiaomi XMWSDJ04MMC Humidity
|
||||
battery_level:
|
||||
name: Xiaomi XMWSDJ04MMC Battery 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: xiaomi_xmwsdj04mmc
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: 84:B4:DB:5D:A3:8F
|
||||
bindkey: d8ca2ed09bb5541dc8f045ca360b00ea
|
||||
temperature:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
ln882h_ble_tracker: !include ../ln882h_ble_tracker/common.yaml
|
||||
xiaomi_xmwsdj04mmc: !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
|
||||
|
||||
sensor:
|
||||
# Explicit ble_hub_id: pins the neutral binding as a declared key.
|
||||
- platform: xiaomi_xmwsdj04mmc
|
||||
ble_hub_id: ble_tracker_hub
|
||||
mac_address: 84:B4:DB:5D:A3:8F
|
||||
bindkey: d8ca2ed09bb5541dc8f045ca360b00ea
|
||||
temperature:
|
||||
name: Xiaomi XMWSDJ04MMC Temperature
|
||||
humidity:
|
||||
name: Xiaomi XMWSDJ04MMC Humidity
|
||||
battery_level:
|
||||
name: Xiaomi XMWSDJ04MMC Battery Level
|
||||
# No ble_hub_id: exercises the generated binding real configs use.
|
||||
- platform: xiaomi_xmwsdj04mmc
|
||||
mac_address: 84:B4:DB:5D:A3:90
|
||||
bindkey: d8ca2ed09bb5541dc8f045ca360b00ea
|
||||
temperature:
|
||||
name: BK Xiaomi XMWSDJ04MMC Implicit Temperature
|
||||
Reference in New Issue
Block a user