-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
Xiaomi Miio vacuum sensor values incorrect #58923
Comments
Hey there @rytilahti, @syssi, @starkillerOG, @bieniu, mind taking a look at this issue as it has been labeled with an integration ( xiaomi_miio documentation |
I have the roborocks S4. I vote for hours as the xiaomi mi app uses but anything is better than seconds. Here is what my sensor are reporting I don't think the sensors are accurate either. I just went and did all the calculations. The app reports in hours which I think is good. But here is what I found out:
|
I've edited my issue, Hours would be acceptable for me too. That is what the attributes used to be reported in. |
I'm seeing the same - the new units come in no calculation close to the values reported by the app. I.e.: S5 Max |
From what I understood, data from the vacuum is in seconds, that’s why it is in second in HA. |
Yeah, that's known. The issue is that the value is incorrect and way off. The unit_of_measurement is a choice (debated, but chosen for s), but then the value should be accurate so if you calculate it back to whatever the original app uses, it is the same. And it isn't. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
And this is the issue at hand ;-) (for all sensors btw) |
Nope. Look at the first post. Only the filter_left and main_brush_left are incorrect. The sensor_dirty_left just suffers a small amount of rounding error. |
All of my maintenance sensors are wrong, including the total cleaned time. |
Same for me, all sensors are way off |
Weird. So the S5 has one sensor that is correct. The S5 Max and S4 sensors are all wrong. |
Could someone try if Also, did the state attributes used to report the values correctly or was it always incorrect? For the "x left" values, the deviation may be caused by different devices reporting the values differently, the current calculations are based on hard-coded values used by my gen1 vacuum as listed here: https://github.com/rytilahti/python-miio/blob/master/miio/integrations/vacuum/roborock/vacuumcontainers.py#L337 edit: I can confirm that the values reported by homeassistant sensors are incorrect. While homeassistant reports positive values (filter left 37,710 s, sensor dirty left 9,473 s) here is what mirobo says:
edit2: Let's keep this issue on the topic of wrong values being reported, and avoid discussing about what is the proper unit to use. There is an architecture issue regarding on the measurement granularity and whether that's backend's or frontend's task, discussion on that should be avoided in this issue. |
It used to be correct. It also used to be in hours which was usable. The new use of seconds as a unit is not. This is definitely part of the issue of the new integration implementation. |
@rytilahti , I would be happy to help. I run HAss in docker. I imagine this would need to be either inside the container or I would need to install something? If you nudge me along I will get what I can. |
I found the problem and the linked PR should fix it, unfortunately it'll be first fixed in the first point release :( @pdobrien3 yes, those commands should be run on the container (or any system) where |
Apologies, was not aware of this issue. Would have looked into it otherwise. But I see @rytilahti already found and fixed the issue 👍🏾. Rookie mistake on my end to not actually validate the data during the migration😅. |
It seems the values are now correct but the units are still not at all appropriate. EDIT: I see a PR is open to fix this. ❤️ |
My values are also correct. Noticed something different though. Will create a new issue if someone else is experiencing it. My vacuum went into error mode yesterday. Got hung up on a cord. I have an automation to notify me when the unit goes to an error state. Before 2021.11, I would receive one notify and all good. Yesterday I was getting spammed about every couple minutes. I looked and the vacuum was going back and forth from unavailable to error causing multiple notifies. Easy to fix in the automation trigger just wanted to make sure it wasn’t a larger issue. |
Unfortunately i have to report that my values are not correct for some reason. Following entities: When i run miiocli vacuum --ip --token --model roborock.vacuum.s5e status i get:
So it appears it's only evaluating based on hours displayed and ignoring "# days"
However sensors says 28960 seconds, which would pretty much mean 8 hours 2 minutes and 40 seconds.
Is the fix planned? |
It's in 2021.11.1 |
Yup, you're right, sorry. Just updated and it's there. Thanks! |
The problem
With the move from attributes to sensors the Xiaomi Miio vacuum integration is no longer reporting accurate values for my S5 vacuum. Some are much worse than others:
Also the use of seconds as a unit is not helpful for values measured in days and will require creating templates sensors for each sensor to rectify this. Can the values be reported in hours instead, as the attribute used to be?
What version of Home Assistant Core has the issue?
core-2021.11.0b3
What was the last working version of Home Assistant Core?
core-2021.10.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
core-2021.11.0b3
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: