Closed bobofruit1970 closed 1 year ago
Got the same issue.
I would like to fix this issue and would be happy about some testing.
I can also help with testing this fix
@mouth4war Cool! I will ping you as soon as I made some progress.
S大,我这边调用xiaomi_miio_airconditioningcompanion.climate_learn_command服务的时候也提示未知错误 型号为:一代米家网关lumi.acpartner.v2
调用服务: service: xiaomi_miio_airconditioningcompanion.climate_learn_command data: entity_id: climate.aqara_air_conditioning_companion
log显示如下: 此错误来自自定义集成。
Logger: homeassistant.helpers.script.websocket_api_script Source: custom_components/xiaomi_miio_airconditioningcompanion/climate.py:577 Integration: xiaomi_miio_airconditioningcompanion (documentation, issues) First occurred: 2022年8月17日 21:07:16 (14 occurrences) Last logged: 13:42:32
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: sleep() got an unexpected keyword argument 'loop' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 195, in async_service_handler await getattr(device, method["method"])(**params) File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 577, in async_learn_command yield from asyncio.sleep(1, loop=self.hass.loop) TypeError: sleep() got an unexpected keyword argument 'loop'
After last upgrade of HA to 7.2 integration services stopped to work properly.
xiaomi_miio_airconditioningcompanion.climate_send_command xiaomi_miio_airconditioningcompanion: climate_learn_command
My clima unit is realizing commands, but I get HA errors in log (LOOP ERROR). when I try to send any command via this service I get errors.
My companion![image](https://user-images.githubusercontent.com/67933104/178105132-67c16cda-5ff3-49d9-bb8c-2c29b48f8806.png)
2022-07-09 13:27:33 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: wait() got an unexpected keyword argument 'loop' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 199, in async_service_handler await asyncio.wait(update_tasks, loop=hass.loop) TypeError: wait() got an unexpected keyword argument 'loop' 2022-07-09 13:27:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2593209504] Error handling message: Unknown error (unknown_error) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 636, in handle_execute_script await script_obj.async_run(msg.get("variables"), context=context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 199, in async_service_handler await asyncio.wait(update_tasks, loop=hass.loop) TypeError: wait() got an unexpected keyword argument 'loop' 2022-07-09 13:29:30 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: wait() got an unexpected keyword argument 'loop' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 199, in async_service_handler await asyncio.wait(update_tasks, loop=hass.loop) TypeError: wait() got an unexpected keyword argument 'loop' 2022-07-09 13:29:30 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2593209504] Error handling message: Unknown error (unknown_error) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 636, in handle_execute_script await script_obj.async_run(msg.get("variables"), context=context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 199, in async_service_handler await asyncio.wait(update_tasks, loop=hass.loop) TypeError: wait() got an unexpected keyword argument 'loop'