xdilian

Results 9 comments of xdilian

> Same here with the Humidifier2 > > Logboek Details (FOUT) Logger: homeassistant.setup Source: setup.py:374 First occurred: 10:29:13 (23 occurrences) Last logged: 10:31:35 > > Unable to prepare setup for...

> > > Same here with the Humidifier2 > > > Logboek Details (FOUT) Logger: homeassistant.setup Source: setup.py:374 First occurred: 10:29:13 (23 occurrences) Last logged: 10:31:35 > > > Unable...

> ![IMG_1097](https://user-images.githubusercontent.com/112108692/244617228-c651b009-b143-47b7-9e28-c5c4df218834.jpeg) 按图修改就可以了 已修复,非常感谢。

> 請問yield from在那? 我使用的另外一种方案,把../custom_components/xiaomi_miot_raw文件夹下每一个.py文件打开查找删除下面两个关键词 1:import asyncio 2:@asyncio.coroutine 删除后重载即可。

> mine still not working Open the ../custom_components/xiaomi_miot_raw folder, open each .py file under the folder to find two keywords to delete, 1: import asyncio 2: @asyncio.coroutine Then reload the...

> > > 請問yield from在那? > > > > > > 我使用的另外一种方案,把../custom_components/xiaomi_miot_raw文件夹下每一个.py文件打开查找删除下面两个关键词 > > 1:import asyncio 2:@asyncio.coroutine 删除后重载即可。 > > 还需要把basic_dev_class.py中的yield from改为await 我把basic_dev_class.py中的yield from改为await后无法正常运行,改回去可以运行。

> > > > yes i did but still not working.... You can try to change the “yield from” in basic_dev_class.py to “await”.

> > > > 我这样做了就可以了。你看看日志有什么错误提示? > > > > > > 請問yield from在那? > > > > > > > > > > > > 我使用的另外一种方案,把../custom_components/xiaomi_miot_raw文件夹下每一个.py文件打开查找删除下面两个关键词 > > > >...

> > > > 这个问题发生的原因是目前版本的home assistant container用的是python 3.11,已经不支持python 3.10以及以前版本的@asyncio.coroutine/yield from的操作了,而是改用了async def/await的方式。这个小米插件是很久之前写的,所以部分地方还在用python3.10的方法。所以我们要做以下修改: 1、删除所有.py文件中的@asyncio.coroutine这一行,但是仅仅删除这行还不够,你还要看看这一行下面的函数定义中有没有: async def ....这样的定义函数方式,大部分文件是有这样写的,但是在最重要的basic_dev_class.py里面的第685行直接写了def...而不是async def...,所以要把这个地方改成async def... 2、将yield from改为await > > 这样应该可以了,我就是这么做的。 > > > > 我这样做了就可以了。你看看日志有什么错误提示? > > >...