home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.47k stars 30.69k forks source link

Platform not found error with Xiaomi Miio integration on startup #78489

Closed salvadornico closed 2 years ago

salvadornico commented 2 years ago

The problem

This error appears in my notifications every time I start up my instance. Sometimes it results in my Mi Purifier not being able to be controlled from HA, but other times it works just fine.

Logger: homeassistant.setup
Source: setup.py:320
First occurred: 09:55:40 (1 occurrences)
Last logged: 09:55:40

Unable to prepare setup for platform xiaomi_miio.select: Platform not found (cannot import name 'DeviceInfo' from 'miio' (/usr/local/lib/python3.10/site-packages/miio/__init__.py)).

Edit: this is the error that appears when the purifier connection doesn't work:

Logger: homeassistant.setup
Source: setup.py:320
First occurred: 17:35:44 (2 occurrences)
Last logged: 17:35:44

Unable to prepare setup for platform xiaomi_miio.fan: Platform not found (No module named 'miio.integrations.airpurifier').
Unable to prepare setup for platform xiaomi_miio.select: Platform not found (No module named 'miio.integrations.airpurifier').

What version of Home Assistant Core has the issue?

2022.9.4

What was the last working version of Home Assistant Core?

No response

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.setup
Source: setup.py:320
First occurred: 09:55:40 (1 occurrences)
Last logged: 09:55:40

Unable to prepare setup for platform xiaomi_miio.select: Platform not found (cannot import name 'DeviceInfo' from 'miio' (/usr/local/lib/python3.10/site-packages/miio/__init__.py)).

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

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)

faustzar commented 2 years ago

Your HA and Xiaomi on the same subnet, I found it does this when the 2 are on different subnets

rytilahti commented 2 years ago

You have some custom component that pins python-miio dependency to an earlier version that is causing this. Please disable any custom components and try again.

salvadornico commented 2 years ago

Thank you. Yes, updating the manifest of the custom component to allow newer version seems to be working. I still need it though since my vacuum is not yet supported by the main library.