Last active
May 4, 2023 03:29
-
-
Save willwhui/d499629ca6c46aaf29ba2a06c2ad209d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
为hass添加小米的智能插座基础版 |
没有python-mirobo,开关加载不成功
配置好yaml之后,启动hass,结果前台显示:
Invalid Config
...
后台日志搜索关键字,找到错误:
Not initializing switch.xiaomi_miio because could not install dependency python-mirobo==0.2.0
原来必须得安装python-mirobo==0.2.0,这是对小米智能插座等设备作支持的模块。
记得在虚拟环境下安装:
$ sudo su homeassistant
$ source /srv/homeassistant/bin/activate
$ pip3 install python-mirobo
因为网络环境的问题出现几次远程连接中断,重复上面的pip3安装命令就好了
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
小米智能插座基础版
小米设备的接入有这篇文章可以看,是@cxlwill 写的
https://sspai.com/post/40113
参见文中的
另外,我也想知道官方文档,找了一下发现从hass前端界面的 Available Components 链接的界面中搜索 "mi":
https://home-assistant.io/components/#search/mi
但是注意,其中写着“Xiaomi Switch”的下面这个链接,是小米zigbee开关,不是wifi插座
https://home-assistant.io/components/switch.xiaomi_aqara/
点击“Xiaomi Smart WiFi Socket and Smart Power Strip”
就是小米wifi插座了
获取插座token比较麻烦
参见https://gist.github.com/willwhui/7829f4a76d8bf8a3410fe50a9000352c