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版本太新问题? #79

Closed
countrysideboy opened this issue Mar 19, 2021 · 7 comments
Closed

无法使用,疑似ha版本太新问题? #79

countrysideboy opened this issue Mar 19, 2021 · 7 comments

Comments

@countrysideboy
Copy link

homeassistant.components.sensor
Source: custom_components/xiaomi_miot_raw/sensor.py:112
Integration: Sensor (documentation, issues)
First occurred: 7:25:00 AM (3 occurrences)
Last logged: 7:25:01 AM

Error while setting up xiaomi_miot_raw platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miot_raw/sensor.py", line 112, in async_setup_platform
miio_device = MiotDevice(ip=host, token=token, mapping=mapping)
TypeError: init() got an unexpected keyword argument 'mapping'

@ha0y
Copy link
Owner

ha0y commented Mar 20, 2021

看样子跟ha版本关系不大,是python_miio依赖库出了问题。

ha0y added a commit that referenced this issue Mar 20, 2021
@ha0y
Copy link
Owner

ha0y commented Mar 20, 2021

经测试,python-miio 0.5.5版本对相关命令的用法发生了变化,在深入了解之前,请先安装0.5.4版本。

@countrysideboy
Copy link
Author

果然~但是网关又不能用了(开发版依赖的版本太新了)

@ha0y
Copy link
Owner

ha0y commented Mar 20, 2021

我个人是十分不建议经常将用于生产环境的东西更新的。总是会出现这种问题。

当然我也是会处理这个问题的。已经向库作者提交问题,等待作者回复。如果不好解决,可能会切换到其他miio库。

@countrysideboy
Copy link
Author

是啊~miio这种更新,没向下兼容。

@ha0y
Copy link
Owner

ha0y commented Mar 21, 2021

最新版本已做临时性适配,仍需等待库作者处理此问题。

@ha0y
Copy link
Owner

ha0y commented Mar 24, 2021

库作者已修复此问题。

@ha0y ha0y closed this as completed Mar 24, 2021
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

2 participants