Skip to content

python-miio v0.5.0 incomplete utils.py #659

Description

@starkillerOG

When I look at the master branch of rytilahti/python-miio in the file: python-miio/miio/utils.py the function int_to_brightness is there.
However when I download the source_code of the v0.5.0 release from: https://github.com/rytilahti/python-miio/archive/0.5.0.zip
And extract the files and then look into python-miio/miio/utils.py the function int_to_brightness is not there.

This causes an import error when installing python-miio through pip3 install --upgrade python-miio and then trying to import the gateway class:

from miio import DeviceException, gateway
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Others\Python37\lib\site-packages\miio\gateway.py", line 8, in <module>
    from .utils import int_to_rgb, int_to_brightness, brightness_and_color_to_int
ImportError: cannot import name 'int_to_brightness' from 'miio.utils' (...\Python37\lib\site-packages\miio\utils.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions