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

Error while setting up xiaomi_miio platform for vacuum #58550

Closed
enkama opened this issue Oct 27, 2021 · 18 comments · Fixed by #58591, #58682, #58817, #58826 or #58901
Closed

Error while setting up xiaomi_miio platform for vacuum #58550

enkama opened this issue Oct 27, 2021 · 18 comments · Fixed by #58591, #58682, #58817, #58826 or #58901

Comments

@enkama
Copy link

enkama commented Oct 27, 2021

The problem

So after updating to the latest beta 2021.11.0b0 my s5 max isnt getting setup anymore.

What version of Home Assistant Core has the issue?

2021.11.0b0

What was the last working version of Home Assistant Core?

2021.10.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

vacuum

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?

[homeassistant.components.vacuum] Error while setting up xiaomi_miio platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 110, in async_setup_entry
    hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE],
KeyError: '54512bfa9457aca0c51ee3b92bb10313'

Additional information

No response

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, @starkillerOG, @bieniu, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


xiaomi_miio documentation
xiaomi_miio source
(message by IssueLinks)

@enkama
Copy link
Author

enkama commented Oct 27, 2021

Also this:

[homeassistant.components.sensor] Error while setting up xiaomi_miio platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/sensor.py", line 603, in async_setup_entry
    device = hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE]
KeyError: '54512bfa9457aca0c51ee3b92bb10313'

@frenck frenck added this to the 2021.11.0 milestone Oct 27, 2021
@hmmbob
Copy link
Contributor

hmmbob commented Oct 28, 2021

Tagging @OGKevin as well, as this is a regression probably caused by #54990

@OGKevin
Copy link
Contributor

OGKevin commented Oct 28, 2021

acked, looking.

@OGKevin
Copy link
Contributor

OGKevin commented Oct 28, 2021

ah, i think its because of this https://github.com/OGKevin/core/blob/e34aed743cf1a1448166a990bfdeefd654f0a452/homeassistant/components/xiaomi_miio/const.py#L198 that is used here https://github.com/OGKevin/core/blob/276345e20a8c6a68d8be2062f2a7d6b19b2ea021/homeassistant/components/xiaomi_miio/__init__.py#L282 to determine if the coordinator should be created or not.

S5 max is not in this list. So the coordinator is never created.

Now i wonder how @frenck got his S5 max working: #57474 (comment)

I'll make a PR adding S5 max to the list and see if my suspicion is indeed correct.

However, S5 max is creating a few sensors that are unsupported. That will be fixed once #57474 (comment) is resolved.

@pdobrien3
Copy link

I am also seeing this on the S4. I spun up the beta last night on a test machine and noticed it. Because it was reported already I didn’t think much to check the logs. After reading this today, I may need to add my error message.

@pdobrien3
Copy link

pdobrien3 commented Oct 28, 2021

Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: roborock.vacuum.s4. Seems to be similar to the S5 issue though ;-)

rytilahti pushed a commit that referenced this issue Oct 28, 2021
* Add ROCKROBO_S5_MAX to xiaomi_miio vacuum models.

#58550

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* disable pylint for todo

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Minor refactor

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
@OGKevin
Copy link
Contributor

OGKevin commented Oct 28, 2021

@Wibias can you try again and report back plz.

@OGKevin
Copy link
Contributor

OGKevin commented Oct 28, 2021

@pdobrien3 just to confirm for my PR, the roborock.vacuum.s4 does not have a mop right?

@OGKevin
Copy link
Contributor

OGKevin commented Oct 28, 2021

Can someone with the power to reopen this issue do it plz for the s4 🙏🏾 and until there is confirmation that its fixed. Did not expect the PR to get merged before confirmation :D.

@enkama
Copy link
Author

enkama commented Oct 28, 2021

@Wibias can you try again and report back plz.

I can try as soon as the new beta or a new dev is out!

@pdobrien3
Copy link

@pdobrien3 just to confirm for my PR, the roborock.vacuum.s4 does not have a mop right?

Correct. No mop on the S4

balloob pushed a commit that referenced this issue Oct 29, 2021
* Add ROCKROBO_S5_MAX to xiaomi_miio vacuum models.

#58550

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* disable pylint for todo

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Minor refactor

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
@enkama
Copy link
Author

enkama commented Oct 29, 2021

@OGKevin Yup, 2021.11.0b1 fixed it. Now its just the #57474 error messages! Thanks!

OGKevin added a commit to OGKevin/python-miio that referenced this issue Oct 29, 2021
for referecne: home-assistant/core#58550 (comment)

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
@hmmbob
Copy link
Contributor

hmmbob commented Oct 29, 2021

Confirmed fixed for my S5 MAX as well, indeed also getting the Could not determine how to parse state value of type <class 'NoneType'> for state <class 'miio.vacuumcontainers.VacuumStatus'> and attribute is_water_shortage error printed every 15sec

@coolguymatt
Copy link

I am getting this error for my Xiaowa E2 vacuum. Should I open a new issue?

Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: roborock.vacuum.e2

@OGKevin
Copy link
Contributor

OGKevin commented Oct 29, 2021

Nah, I'll add that model to the list tomo/later tonight 👍🏾

@brendann993
Copy link

brendann993 commented Nov 1, 2021

Hey @OGKevin Roborock S6 Pure is another vacuum which was working prior to the update but now reports the “unsupported model” I’ve tested adding a const for it which appears to work if we can get it added properly. It’s roborock.vacuum.a08
While it does have a mop I don’t think it has sensors for the mop as it always returns false for me. Thanks

OGKevin added a commit to OGKevin/python-miio that referenced this issue Nov 1, 2021
home-assistant/core#58550 (comment)

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
@OGKevin
Copy link
Contributor

OGKevin commented Nov 1, 2021

While it does have a mop I don’t think it has sensors for the mop as it always returns false for me

We can have a look at that after the release. Feel free to create a new issue for that.

rytilahti pushed a commit to rytilahti/python-miio that referenced this issue Nov 29, 2021
* Add S4 to the list of supported models.

for referecne: home-assistant/core#58550 (comment)

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Add s4 max to supported vacuum models

home-assistant/core#57474 (comment)

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Add Roborock S6 Pure to support vacuum models.

home-assistant/core#58550 (comment)

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.