You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
按报错信息File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 709, in async_service_handler
yield from asyncio.wait(update_tasks, loop=self.hass.loop)
将/config/custom_components/xiaomi_miot_raw/basic_dev_class.py代码修改去掉loop=self.hass.loop,可以消除错误。
此方法有参考【调用execute_text服务,报"wait() got an unexpected keyword argument 'loop'" #468】问题的回复。
代码修改:
## yield from asyncio.wait(update_tasks, loop=self.hass.loop)yieldfromasyncio.wait(update_tasks)
homeassistant日志
此错误来自自定义集成。
Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/xiaomi_miot_raw/basic_dev_class.py:709
Integration: Xiaomi MIoT (documentation, issues)
First occurred: 2023年4月26日 18:24:27 (7 occurrences)
Last logged: 08:33:06
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 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 1820, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 709, in async_service_handler
yield from asyncio.wait(update_tasks, loop=self.hass.loop)
TypeError: wait() got an unexpected keyword argument 'loop'
The text was updated successfully, but these errors were encountered: