Skip to content

Add support Xiaomi Smoke Alarm 2 (xiaomi.sensor_smoke.yg2, pdid 31418) - #1773

Open
ptbsare wants to merge 1 commit into
AlexxIT:masterfrom
ptbsare:add-xiaomi-smoke-alarm-2-yg2
Open

ptbsare wants to merge 1 commit into
AlexxIT:masterfrom
ptbsare:add-xiaomi-smoke-alarm-2-yg2

Conversation

@ptbsare

@ptbsare ptbsare commented Sep 17, 2026

Copy link
Copy Markdown

Description

Add support for the new Xiaomi Smoke Alarm 2 (小米烟感卫士2), pdid 31418, miot-spec xiaomi.sensor_smoke.yg2.

This is a distinct second-generation device from the already-supported pdid 2455 (lumi.sensor_smoke.mcn02).

Changes

Added devices.py entry with full spec coverage:

  • smoke (binary_sensor) - 2.p.1004, 1=normal, 2=alarm
  • status (sensor, diagnostic) - full state including fault/dust/high_temp
  • battery_low (binary_sensor, diagnostic disabled) - 6.p.1132, 0=full, 1=low
  • battery_state (sensor, diagnostic) - full battery state
  • mute (binary_sensor) - 2.p.1059
  • sensitivity (sensor, diagnostic disabled) - 2.p.1054, phone-BLE config only
  • heartbeat_led (sensor, diagnostic disabled) - 4.p.1, phone-BLE config only
  • temperature (sensor) - 2.e.1017.p.1001
  • smoke_duration (sensor) - 2.e.1017.p.1130, seconds
  • action (sensor) - event type 0-12 full table from official spec
  • reset/low_battery events - 2.e.1028, 6.e.1001
  • custom_property_3/5 (sensor, diagnostic disabled)

Verification

Spec confirmed via gateway _sync.ble_spec_query_prod response and official miot-spec page:

Related: #1772

- smoke, status, battery_low/battery_state, mute, temperature, smoke_duration, action
- event 2.e.1028 (device reset), 2.e.1001 (low battery)
- diagnostic entities for sensitivity/heartbeat_led/custom-props
- based on official miot-spec xiaomi.sensor_smoke.yg2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant