Giter VIP home page Giter VIP logo

Comments (16)

HepoH3 avatar HepoH3 commented on May 20, 2024 1

Okay, now I found what was the problem — it was this custom integration who caused the problems because of python-miio version in those manifest.

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

I also encountered this error, but I don't know why. Just restart HA.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

I also encountered this error, but I don't know why. Just restart HA.

I have this error at every single HA restart :)

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

Try last commit: cb86416 of master.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

@al-one, thank you for reply!
Now, in addition to previous error, I got new error:

Error while setting up xiaomi_miot platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/xiaomi_miot/camera.py", line 44, in async_setup_entry
    await async_setup_config_entry(hass, config_entry, async_setup_platform, async_add_entities, ENTITY_DOMAIN)
  File "/config/custom_components/xiaomi_miot/__init__.py", line 369, in async_setup_config_entry
    await async_setup_platform(hass, c, async_add_entities)
  File "/config/custom_components/xiaomi_miot/camera.py", line 62, in async_setup_platform
    entities.append(MiotCameraEntity(hass, cfg, srv))
  File "/config/custom_components/xiaomi_miot/camera.py", line 71, in __init__
    super().__init__(miot_service, config=config)
  File "/config/custom_components/xiaomi_miot/__init__.py", line 1012, in __init__
    super().__init__(miot_service, device, **kwargs)
  File "/config/custom_components/xiaomi_miot/__init__.py", line 589, in __init__
    device = MiotDevice(ip=host, token=token)
TypeError: __init__() missing 1 required positional argument: 'mapping'

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

You need to clean up the installed python-miio or upgrade it to v0.5.5.2, and recommended upgrade HA to v2021.4.0.

rm -rf /usr/local/lib/python3.8/site-packages/*miio*
pip install -U python-miio
pip install -U homeassistant

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

You need to clean up the installed python-miio or upgrade it to v0.5.5.2, and recommended upgrade HA to v2021.4.0.

rm -rf /usr/local/lib/python3.8/site-packages/*miio*
pip install -U python-miio
pip install -U homeassistant

Actually, I'm using HassOS, so I can't operate manualy with python libs.After upgrading HA to v2021.4.0 errors remains.

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

Try last commit: 3fd2c3a of master.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

Now, new error went away, but original one still there.

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

Find the version of python-miio you are using.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

python-miio

I will try, but currently don't know how to do this.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

Find the version of python-miio you are using.

Okay, found it. Version 0.5.5.

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

So I succeed in updating miio version. Now error is:
Unable to prepare setup for platform xiaomi_miot.sensor: Platform not found (No module named 'miio.waterpurifier_yunmi').
UPD. nope, I rechecked version, print(miio.version) still says 0.5.5.

from hass-xiaomi-miot.

karolzamosc avatar karolzamosc commented on May 20, 2024

So I succeed in updating miio version. Now error is:
Unable to prepare setup for platform xiaomi_miot.sensor: Platform not found (No module named 'miio.waterpurifier_yunmi').
UPD. nope, I rechecked version, print(miio.version) still says 0.5.5.

Any news? I have same problems too... After updating HA to the newest version my miio2 integration for STYTJ02YM vaccum stopped working. I had a HACS integration for Air Purifier 2S but it now supprted by built in miio integration. After uninstall miio2 all works fine but I can not add my vacuum to HA then... :-(

from hass-xiaomi-miot.

HepoH3 avatar HepoH3 commented on May 20, 2024

In addition, now I can see another errors:
Error occurred loading configuration flow for integration xiaomi_miio: No module named 'miio.gateway.gateway'; 'miio.gateway' is not a package
and

Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 573, in async_create_flow
    integration.get_platform("config_flow")
  File "/usr/src/homeassistant/homeassistant/loader.py", line 485, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/__init__.py", line 5, in <module>
    from miio.gateway.gateway import GatewayException
ModuleNotFoundError: No module named 'miio.gateway.gateway'; 'miio.gateway' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 120, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 580, in async_create_flow
    raise data_entry_flow.UnknownHandler
homeassistant.data_entry_flow.UnknownHandler

from hass-xiaomi-miot.

al-one avatar al-one commented on May 20, 2024

I suggest you recreate your HA environment.

from hass-xiaomi-miot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.