/ZhiMi

XiaoMi CloudService for HomeAssistant

Primary LanguagePython

XiaoMi Cloud Service for HomeAssistant

1. 安装准备

zhimi 放入 custom_components;也支持在 HACS 中添加自定义库的方式安装。

部分组件依赖 Zhi,请一并安装。 依赖 MiService,运行时自动检查安装。

2. 配置方法

参见 我的 Home Assistant 配置configuration.yaml

zhimi:
  username: !secret zhimi_username
  password: !secret zhimi_password
  • 必选 username 小米账号
  • 必选 password 小米密码

登录后会在 .storage 下记录 zhimi 的 token 文件,删除后会自动重新登录。

3. 使用方式

在其它插件中使用 get_miio_service(),如 ZhiMsg

后续如果有必要可以暴露其它服务。

4. 参考