云端接入:小米账号,存在延迟,断网不可用
本地接入:HA托管,延迟低,断网可用
刷固件的方式接入
优缺点:米家APP失效,测温间隔变小,耗电
按照教程刷完固件之后,可以看到很多设置选项
接入小米温湿度计2
参考:
https://blog.csdn.net/weixin_44968310/article/details/89506254
https://www.home-assistant.io/integrations/mitemp_bt
获取MAC地址
MAC地址是网卡厂商决定的,不会变,所以可以先接入米家查看MAC地址,同一时间只能轮询一个BLE设备
编辑configuration.yaml
每个选项有点fuzz的意思
timeout integer (optional, default: 10)
Define the timeout value in seconds when polling.
Define the number of retries when polling.
polling发生在什么时候
sensor:
- platform: mitemp_bt
mac: "xx:xx:xx:xx:xx:xx"#A4:C1:38:B4:C3:85
name: Kids Room Temp #HA中的名称
force_update: true
median: 1 #峰值问题
monitored_conditions:
- temperature
- humidity
- battery
添加Integration
坑:官方Integration里Mijia BLE温湿度计是单独一项,但是HA搜不到
去看Xiaomi Gateway(Aqara)的详细描述,温湿度传感器是包含在这个Integration里,发现大部分小米设备都在里面
Integration的描述:
The xiaomi_aqara integration allows you to integrate Xiaomi Aqara-compatible devices into Home Assistant.
一旦开启了局域网控制,不需要密码,HA就能在网络中发现并控制它