We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
首先在这里感谢 @mac-zhou @blindlight86 @vividmuse 等各位大佬对美的美的设备协议和美居APP接口的不懈努力,此插件的只要功能即将美的设备的读写命令通过yaml转换为HA实体。美的设备的读写命令是通过字节(byte)数组传输的,因此适配美的设备需要一点编程基础。
当前阶段,本插件仅支持yaml配置,后续会支持通过UI集成
# configuration.yaml meiju: # 单个账号 username: 18866668888 # 美居APP账号 password: abcdefghijk # 美居APP密码 devices: # 设备列表 - device_id: 160123456789001 # 设备ID host: 192.168.1.101 # 设备IP - device_id: 160123456789002 host: 192.168.1.102 # 多个账号 accounts: - username: 18866668881 # 账号1 - username: 18866668882 # 账号2 devices: # 设备列表 customizes: # 设备自定义
customizes:
template
get_extra: {10: 0x31}
0x31
0x03
set_extra: {10: 0x21}
0x21
sensors:
byte: 11
dict:
state_template:
attrs_template:
binary_sensors:
sensors
switches:
on_value: 0x01
off_value: 0x00
on_extra:
off_extra:
selects:
set_extra:
options:
name:
extra:
numbers:
max:
min:
step:
meiju.get_lua
lua
0x02
get_extra
set_extra
modelNumber
sn8
meiju.get_plugin
device_customizes.yaml
The text was updated successfully, but these errors were encountered:
No branches or pull requests
首先在这里感谢 @mac-zhou @blindlight86 @vividmuse 等各位大佬对美的美的设备协议和美居APP接口的不懈努力,此插件的只要功能即将美的设备的读写命令通过yaml转换为HA实体。美的设备的读写命令是通过字节(byte)数组传输的,因此适配美的设备需要一点编程基础。
customizes:
根据设备类型或SN8(型号)为设备解析命令成HA实体的配置,类似于HA的template
,可以为设备添加不同类型的实体以展示状态和控制设备get_extra: {10: 0x31}
配置查询状态命令索引为10的byte值为0x31
,部分设备为0x03
或其他set_extra: {10: 0x21}
配置控制设备命令索引为10的byte值为0x21
sensors:
添加sensor传感器实体byte: 11
表示该实体的状态在状态byte数组的第12位上(索引为11)dict:
字典或数组,映射状态值state_template:
实体状态模板attrs_template:
实体属性模板,返回字典binary_sensors:
添加二元传感器实体,同sensors
state_template:
实体状态模板,返回布尔switches:
添加开关实体on_value: 0x01
byte位上的值等于此值时表示开off_value: 0x00
byte位上的值等于此值时表示关on_extra:
打开时设置额外的byte数据,字典类型off_extra:
关闭时设置额外的byte数据,字典类型selects:
添加下拉选择实体,如:模式set_extra:
选中选项时设置额外的byte数据options:
下拉选项,字典类型,key为byte位上的值name:
选项名称extra:
选中时额外的byte数据,字典类型numbers:
添加数值实体,如:目标温度max:
最大值min:
最小值step:
步长,默认1meiju.get_lua
服务获取设备的lua脚本lua
目录下有常用设备的lua0x02
控制0x03
读取)get_extra
set_extra
modelNumber
或sn8
来区分,这两种型号可以在info实体的属性中找到meiju.get_plugin
服务获取设备的JS插件代码device_customizes.yaml
一起参与适配。The text was updated successfully, but these errors were encountered: