Code Monkey home page Code Monkey logo

Comments (22)

kwxiaozhu avatar kwxiaozhu commented on July 17, 2024 4

still not work 2023.6.0.2
docker image homeassistant/home-assistant latest ffe65a678393

Platform error: climate
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 936, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1074, in get_code
  File "<frozen importlib._bootstrap_external>", line 1004, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 295
    await self.async_turn_on()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'await' outside async function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 928, in async_process_component_config
    platform = p_integration.get_platform(domain)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
    raise ImportError(
ImportError: Exception importing custom_components.xiaomi_miio_airconditioningcompanion.climate

Unexpected exception importing platform custom_components.xiaomi_miio_airconditioningcompanion.climate
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 "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 936, in exec_module
File "", line 1074, in get_code
File "", line 1004, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 295
await self.async_turn_on()
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'await' outside async function

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 3

I will have a look. Thanks for your feedback!

from xiaomi_airconditioningcompanion.

kwxiaozhu avatar kwxiaozhu commented on July 17, 2024 2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 678, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1533, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 410, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 454, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 477, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 194, in async_service_handler
    await getattr(device, method["method"])(**params)
TypeError: object generator can't be used in 'await' expression

when call the service: xiaomi_miio_airconditioningcompanion.climate_learn_command
new version 2023.6.0.0

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 2

I've to prepare a test setup now to get an idea what's going on and needs to be changed.

from xiaomi_airconditioningcompanion.

sebbio avatar sebbio commented on July 17, 2024 2

the same mistake as in this issue

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 1

I've prepared a new release (2023.6.0.0). Please give it a try!

from xiaomi_airconditioningcompanion.

Leo4242 avatar Leo4242 commented on July 17, 2024 1

I have the same issue

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 1

It looks like I wasn't awake this morning. I've pushed another release. Please give it a try! May be there are more issues which needs to be fixed.

from xiaomi_airconditioningcompanion.

kwxiaozhu avatar kwxiaozhu commented on July 17, 2024 1

not work 2023.6.0.1

Unexpected exception importing platform custom_components.xiaomi_miio_airconditioningcompanion.climate
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 936, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1074, in get_code
  File "<frozen importlib._bootstrap_external>", line 1004, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 310
    yield from self._async_update_power_state(new_state)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'yield from' inside async function

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 1

Fixed. Please try 2023.6.0.2.

from xiaomi_airconditioningcompanion.

slydiman avatar slydiman commented on July 17, 2024 1

The source of this issue is python 3.11.

from xiaomi_airconditioningcompanion.

axyskus avatar axyskus commented on July 17, 2024 1

still not working. the same mistake as in this issue

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 1

I've pushed another release. I hope it doesn't make the problem worse. I'm pretty bad in doing things async.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024 1

I've pushed another fix & prepared a new release to mitigate this issue.

from xiaomi_airconditioningcompanion.

yurtaevalex avatar yurtaevalex commented on July 17, 2024

Logger: homeassistant.loader
Source: loader.py:850
First occurred: 08:59:08 (2 occurrences)
Last logged: 08:59:08

Unexpected exception importing platform custom_components.xiaomi_miio_airconditioningcompanion.climate
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 "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 936, in exec_module
File "", line 1074, in get_code
File "", line 1004, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 295
await self.async_turn_on()
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'await' outside async function

from xiaomi_airconditioningcompanion.

yurtaevalex avatar yurtaevalex commented on July 17, 2024

Я нажал еще один релиз. Надеюсь, это не усугубит проблему. Я довольно плохо делаю что-то асинхронное.

It worked, thanks for the speed

from xiaomi_airconditioningcompanion.

vincentstarjammer avatar vincentstarjammer commented on July 17, 2024

I can also confirm, all functionality is restored with 2023.6.0.3. It also works with the new Supervisor 2023.06.1

from xiaomi_airconditioningcompanion.

axyskus avatar axyskus commented on July 17, 2024

yes, it is working now. lots of thanks for speed

from xiaomi_airconditioningcompanion.

sebbio avatar sebbio commented on July 17, 2024

Now working fine

from xiaomi_airconditioningcompanion.

Leo4242 avatar Leo4242 commented on July 17, 2024

There are still issues, and I still receive error messages when calling learn_command and send_command services

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on July 17, 2024

Could you provide the error messages including the stack traces? Thanks in advance!

from xiaomi_airconditioningcompanion.

hoanglongutc avatar hoanglongutc commented on July 17, 2024

Could you provide the error messages including the stack traces? Thanks in advance!

This error originated from a custom integration.

Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/xiaomi_miio_airconditioningcompanion/climate.py:198
Integration: xiaomi_miio_airconditioningcompanion (documentation, issues)
First occurred: 06:35:21 (1 occurrences)
Last logged: 06:35:21

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Passing coroutines is forbidden, use tasks explicitly.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 198, in async_service_handler
await asyncio.wait(update_tasks)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.

-----------------------------------------‐---------

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/xiaomi_miio_airconditioningcompanion/climate.py:198
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 06:35:21 (1 occurrences)
Last logged: 06:35:21

[140459890109840] Error handling message: Unknown error (unknown_error) HA from 192.168.x.x(Mozilla/5.0 (Linux; Android 13; SM-xxx Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.162 Mobile Safari/537.36 Home Assistant/2023.3.0-3260 (Android 13; SM-xxx))
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 678, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1533, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 410, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 454, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 477, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 198, in async_service_handler
await asyncio.wait(update_tasks)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.

from xiaomi_airconditioningcompanion.

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.