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.54k stars 30.72k forks source link

Xiaomi_miio integration error #36685

Closed samuel-azerty closed 4 years ago

samuel-azerty commented 4 years ago

The problem

I have a new xiaomi purifier 3H that doesn't install on home assistant.

Platform error fan.xiaomi_miio - cannot import name 'brightness_and_color_to_int' from 'miio.utils' (/usr/local/lib/python3.7/site-packages/miio/utils.py)

Environment

Problem-relevant configuration.yaml

  - platform: xiaomi_miio
    host: 192.168.1.73
    token: xxxxxx
    model: zhimi.airpurifier.mb3

Traceback/Error logs

Logger: homeassistant.components.homeassistant
Source: components/homeassistant/__init__.py:111
Integration: Home Assistant (documentation, issues)
First occurred: 21:35:26 (1 occurrences)
Last logged: 21:35:26

Platform error fan.xiaomi_miio - cannot import name 'brightness_and_color_to_int' from 'miio.utils' (/usr/local/lib/python3.7/site-packages/miio/utils.py)

Additional information

Inside containter pip3 show python-miio

Name: python-miio Version: 0.5.0.1 Summary: Python library for interfacing with Xiaomi smart appliances Home-page: https://github.com/rytilahti/python-miio Author: Teemu Rytilahti Author-email: tpr@iki.fi License: GPLv3 Location: /usr/local/lib/python3.7/site-packages Requires: cryptography, zeroconf, tqdm, click, pytz, appdirs, attrs, netifaces, construct Required-by:

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

xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)

rytilahti commented 4 years ago

Sounds like your installation is broken (likely a dupe of #36045), 0.5.0.1 definitely has that method in the utils. Please reopen if that's not the case.