home-assistant / home-assistant/core
Xiaomi BLE MI_SCALE fails with KeyError ExtendedBinarySensorDeviceClass.STABILIZED
- Dominant language
- Python
- Stars
- 90.5k
- Forks
- 38.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 597
Description
### The problem
The Xiaomi BLE integration stopped processing measurements from my Xiaomi MI_SCALE.
Bluetooth communication itself is working correctly. Home Assistant receives
advertisements from the scale, but xiaomi_ble raises a KeyError when the
measurement becomes stabilized.
The error is:
KeyError:
The problem appears to be that STABILIZED is returned by the xiaomi-ble parser,
but there is no corresponding entry in BINARY_SENSOR_DESCRIPTIONS in:
homeassistant/components/xiaomi_ble/binary_sensor.py
I tested a temporary patch which adds a BinarySensorEntityDescription for:
ExtendedBinarySensorDeviceClass.STABILIZED
After restarting Home Assistant with this patch, the MI_SCALE immediately
started working again and stabilized weight measurements are processed normally.
Therefore Bluetooth reception, the scale itself and the Bluetooth proxy are
working correctly. The missing STABILIZED binary sensor description appears
to be the cause.
### What version of Home Assistant Core has the issue?
core-2026.9.1
### What was the last working version of Home Assistant Core?
Previous one
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
_No response_
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
```
### Additional information
_No response_
Contributor guide
Research direction
Start in homeassistant/components/xiaomi_ble/binary_sensor.py and trace how the xiaomi-ble parser's STABILIZED value is mapped when a measurement becomes stabilized. Verify the binary sensor description covers that parser value and that MI_SCALE measurements process without the reported KeyError after restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100