ble_monitor
ble_monitor copied to clipboard
[Bug]: Incorrect unit_of_measurement for Xiaomi Mi Scale V2
What happened?
The unit_of_measurement for the Xiaomi Mi Scale V2 is incorrectly set to "Ohm" instead of "ohm". This causes issues when integrating with other functionalities in Home Assistant that expect the unit to be in lowercase.
I suspect that the issue with the unit_of_measurement being set to "Ohm" is causing problems when creating a helper to calculate the average value. When the unit is "Ohm", the helper does not return a value. If I manually change the unit to "ohm", it starts working, but after a short period, the unit of measurement reverts back to "Ohm". I have modified the const.py file to change UNIT_OF_MEASUREMENT_OHM to "ohm" and restarted Home Assistant, but the issue persists. Deleting and recreating the entity did not resolve the problem.
Sensor type
Xiaomi Mi Scale V2
Relevant log output
**System Details:**
- Home Assistant version: [e.g., 2023.7.1]
- Passive BLE Monitor version: [e.g., 1.0.5]
- Xiaomi Mi Scale V2 firmware version: [e.g., 2.0.0]
Ohm or ohm is not an "official" unit of measurement in Home Assistant, as far as I can see. Which component is expecting ohm to be lowercase?