Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Incorrect unit_of_measurement for Xiaomi Mi Scale V2 #1382

Open
Juriga1 opened this issue Jul 25, 2024 · 1 comment
Open

[Bug]: Incorrect unit_of_measurement for Xiaomi Mi Scale V2 #1382

Juriga1 opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Juriga1
Copy link

Juriga1 commented Jul 25, 2024

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]
@Juriga1 Juriga1 added the bug Something isn't working label Jul 25, 2024
@Ernst79
Copy link
Collaborator

Ernst79 commented Aug 25, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants