core: Xiaomi Miio Vacuum: Could not determine how to parse state value of type
The problem

What is version of Home Assistant Core has the issue?
core-2021.11.0.dev20211011
What was the last working version of Home Assistant Core?
core-2021.11.0.dev20211006
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Xiaomi Miio
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?
Could not determine how to parse state value of type <class 'NoneType'> for state <class 'miio.vacuumcontainers.VacuumStatus'> and attribute is_water_box_carriage_attached
Could not determine how to parse state value of type <class 'NoneType'> for state <class 'miio.vacuumcontainers.VacuumStatus'> and attribute is_water_shortage
Additional information
Probably a regression introduced in #54990
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 36 (30 by maintainers)
Commits related to this issue
- Add S5 MAX model to support models list. S5 MAX seems to work with this lib, however it is not added to the list of supported vacuums. This adds it. https://github.com/home-assistant/core/issues/574... — committed to OGKevin/python-miio by OGKevin 3 years ago
- Add S5 MAX model to support models list. (#1157) * Add S5 MAX model to support models list. S5 MAX seems to work with this lib, however it is not added to the list of supported vacuums. This adds... — committed to rytilahti/python-miio by OGKevin 3 years ago
- Add s4 max to supported vacuum models https://github.com/home-assistant/core/issues/57474#issuecomment-955740462 Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com> — committed to OGKevin/python-miio by OGKevin 3 years ago
- Add more supported vacuum models (#1173) * Add S4 to the list of supported models. for referecne: https://github.com/home-assistant/core/issues/58550#issuecomment-953785985 Signed-off-by: Kevin... — committed to rytilahti/python-miio by OGKevin 3 years ago
Yes, I can work on that once https://github.com/home-assistant/core/pull/57553 is resolved 😃
Ping @OGKevin
Why have all these models never been added to the list 😮 Will add
roborock.vacuum.a19to the list, that should fix the unavailable part. Not sure how you’ve managed to create the mopping sensors tho 🤔 the following code should have blcoked it: https://github.com/home-assistant/core/blob/ed80f8c291b487103a8624c6eba293dcc00cfdbb/homeassistant/components/xiaomi_miio/binary_sensor.py#L116-L117So I’m confused on that part. Lets wait for #57553 and my PR to add a19 to the list to get merged and see if the issue is still there afterwards.
Alright, ill hold on on working on the vacuum sensor fix after: https://github.com/home-assistant/core/pull/57553 as it will cause merge conflicts. Don’t want to branch of from that neither as it not clear if that PR will be accepted or not yet.
We have to hurry tho, it will be Nov soon and want to have this fixed before it released.
@OGKevin, sorry for the delay. I think that approach is fine, and until the vacuums inside python-miio get refactored to have feature flags & an interface for exposing supported model information, I think it’s best to have have that const living inside homeassistant for this use case.
Sometimes means 3-4 times per hour. These values are supported by the device and usually are normally reported.
@OGKevin
Models S5: roborock.vacuum.s5 S5 Max: roborock.vacuum.s5e
I have been seeing these as well but with a different device
2021-10-11 10:27:51 WARNING (MainThread) [homeassistant.components.xiaomi_miio.device] Could not determine how to parse state value of type <class 'NoneType'> for state <class 'miio.airpurifier.AirPurifierStatus'> and attribute filter_typeIf this should be a separate issue let me know but the error is very similar.