Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA 2023.6 Update Error #518

Open
cataseven opened this issue Jun 8, 2023 · 12 comments
Open

HA 2023.6 Update Error #518

cataseven opened this issue Jun 8, 2023 · 12 comments

Comments

@cataseven
Copy link

cataseven commented Jun 8, 2023

Hi,

After the update I am getting this error for Xiaomi Miot Raw integration

This error originated from a custom integration.

The following integrations and platforms could not be set up:

  • xiaomi_miot_raw.sensor
  • xiaomi_miot_raw.binary_sensor
  • xiaomi_miot_raw.number filter=xiaomi_miot_raw.number))
  • xiaomi_miot_raw.fan
  • xiaomi_miot_raw.select
  • xiaomi_miot_raw.vacuum filter=xiaomi_miot_raw.vacuum))

Please check your config and
Logger: homeassistant.loader
Source: custom_components/xiaomi_miot_raw/basic_dev_class.py:684
Integration: Xiaomi MIoT (documentation, issues)
First occurred: 12:34:59 (6 occurrences)
Last logged: 12:35:00

Unexpected exception importing platform custom_components.xiaomi_miot_raw.binary_sensor
Unexpected exception importing platform custom_components.xiaomi_miot_raw.number
Unexpected exception importing platform custom_components.xiaomi_miot_raw.fan
Unexpected exception importing platform custom_components.xiaomi_miot_raw.select
Unexpected exception importing platform custom_components.xiaomi_miot_raw.vacuum

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/xiaomi_miot_raw/sensor.py", line 20, in <module>
    from .basic_dev_class import (
  File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 63, in <module>
    class GenericMiotDevice(Entity):
  File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 684, in GenericMiotDevice
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'
Logger: homeassistant.setup
Source: setup.py:374
First occurred: 12:34:59 (6 occurrences)
Last logged: 12:35:00

Unable to prepare setup for platform xiaomi_miot_raw.binary_sensor: Platform not found (Exception importing custom_components.xiaomi_miot_raw.binary_sensor).
Unable to prepare setup for platform xiaomi_miot_raw.number: Platform not found (Exception importing custom_components.xiaomi_miot_raw.number).
Unable to prepare setup for platform xiaomi_miot_raw.fan: Platform not found (Exception importing custom_components.xiaomi_miot_raw.fan).
Unable to prepare setup for platform xiaomi_miot_raw.select: Platform not found (Exception importing custom_components.xiaomi_miot_raw.select).
Unable to prepare setup for platform xiaomi_miot_raw.vacuum: Platform not found (Exception importing custom_components.xiaomi_miot_raw.vacuum).
@cataseven
Copy link
Author

@Gerrett84
Copy link

Go to your ../custom_components/xiaomi_miot_raw folder & And remove the following in each *.py file.

import asyncio
@asyncio.coroutine

Then reload the addon, and then it will run again :-)

@cataseven
Copy link
Author

Go to your ../custom_components/xiaomi_miot_raw folder & And remove the following in each *.py file.

import asyncio @asyncio.coroutine

Then reload the addon, and then it will run again :-)

This is the easiet solution. Thanks

@mattiabrunello5
Copy link

Hi , I need some help.
I try to fix this problem with the latest version of HA, when I try to delete this file I don't find it in "config/custom_component/xiaomi_miot_raw".
I try with file editor , studio code server and SAMBA SHARE with no solution can any help me Thanks

@cataseven
Copy link
Author

cataseven commented Jun 9, 2023 via email

@Ricricric109
Copy link

mine still not working

@kongh9
Copy link

kongh9 commented Jun 11, 2023

Go to your ../custom_components/xiaomi_miot_raw folder & And remove the following in each *.py file.

import asyncio @asyncio.coroutine

Then reload the addon, and then it will run again :-)

also need to change "yield from" to "await" in basic_dev_class.py (line 705,709)

@kpblca
Copy link

kpblca commented Jun 13, 2023

I have the same issue after updating of HA 2023.6 version

@wuai1024
Copy link

Is this project no longer maintained

@kpblca
Copy link

kpblca commented Jun 14, 2023

Additionally, its required one more change from: #516 (comment)

@ongct
Copy link

ongct commented Oct 9, 2023

It works for me by just removing 'import asyncio' and '@asyncio.coroutine'. Thank you very much.

@sonicno1
Copy link

024-04-10 22:34:18.516 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 554, in create_sub_entities
self._hass.data[DOMAIN]['add_handler']['number'][self._entry_id](num_to_add, update_before_add=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'number'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants