core: Error setting up entry Mi Air Purifier 3C for xiaomi_miio

The problem

After the udate for 2022.3 the xiaomi_miio integration is no longer working with my Mi Air Purifier 3C. I tried to remove it and put it back and it is still failing. The logs are below.

What version of Home Assistant Core has the issue?

core-2022.3.0

What was the last working version of Home Assistant Core?

core-2022.2 latest

What type of installation are you running?

Home Assistant OS

Integration causing the issue

xiaomi_miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio

Diagnostics information

Logger: homeassistant.config_entries Source: components/xiaomi_miio/init.py:318 First occurred: 11:10:09 PM (1 occurrences) Last logged: 11:10:09 PM

Error setting up entry Mi Air Purifier 3C for xiaomi_miio Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 335, in async_setup result = await component.async_setup_entry(hass, self) File “/usr/src/homeassistant/homeassistant/components/xiaomi_miio/init.py”, line 131, in async_setup_entry or await async_setup_device_entry(hass, entry) File “/usr/src/homeassistant/homeassistant/components/xiaomi_miio/init.py”, line 455, in async_setup_device_entry await async_create_miio_device_and_coordinator(hass, entry) File “/usr/src/homeassistant/homeassistant/components/xiaomi_miio/init.py”, line 318, in async_create_miio_device_and_coordinator device = AirPurifierMB4(host, token) File “/usr/local/lib/python3.9/site-packages/miio/utils.py”, line 42, in new_func1 return func1(*args, **kwargs) File “/usr/local/lib/python3.9/site-packages/miio/airpurifier_miot.py”, line 553, in init super().init(*args, **kwargs) RuntimeError: super(): no arguments

Example YAML snippet

No response

Anything in the logs that might be useful for us?

log is already offered

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 19 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Downgrading to 2022.2.9 works

Fixed for me in 2022.3.2

Downgrading to 2022.2.9 works

Yep, but it’s not the best solution 😄

I have the same error. My Xiaomi Air Purifier 3C is not working, but 3H is detected and working correctly.

Not fixed in 2022.3.1

@alesoft73 The traceback is still showing that AirPurifierMB4 line that does not exist anymore in the code, so I think you are trying to test it against outdated code.

Feel free to test the linked PR, the relevant part for 3C is removing those two lines at https://github.com/home-assistant/core/pull/67590/files#diff-6d8542b3768a850a8601f2fab8b6ff78fb23b9635055c40e7c38a27904c33293L318-L319 if you wish to test it manually.

Looks indeed that no one was testing this code path during the beta, nor was there a test for this. So, if you wish to contribute, running beta releases is very helpful to to spot such issues before they get released to the greater public. Or even better, improvements to the test suite for both python-miio and this integration are more than welcome!

Same error

Same error, no custom component

Please disable any xiaomi custom components (if any) and see if that helps. Such problems has been previously caused by custom components pinning an older python-miio version (0.5.10 is the one that is currently required by homeassistant).