3、配置HA
配置文件如下(如一个设备有多个开个的,可以在项目地址找到配置方法,我这里只有一个开关)sonoff:
username: +8613300000000 #易微联账号
password: password #易微联密码
reload: always # HA启动时刷新列表
default_class: switch # changes the default class of all devices from switch to light默认设备类型
devices:
1000abcdefg:
devicekey: 9512321541-732132e-321-a457-323213213
device_class: switch # changes the default class of the device from switch to light设备类型
发现还能同步易微联APP上的设备名称 易微联APP和HA好像可以同时操作,如果HA重启之后显示设备不可用,可以打开易微联APP操作一下设备HA就在线了,这是我个人的使用不代表全部欢迎测试
devices:
1000abcdefg:
devicekey: 9512321541-732132e-321-a457-323213213
device_class: switch # changes the default class of the device from switch to light设备类型
测试了 还是不行
配置文件已经改成最这种了
devices:
1000abcdefg:
devicekey: 9512321541-732132e-321-a457-323213213
device_class: switch # changes the default class of the device from switch to light设备类型