-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested
Description
需求
当前期望控制的是一个4开关面板其中的1个开关。
问题
无法读取并设置开关状态
背景
这个4开关面板,可以设置“在首页展示为4个按键”,在下文中记作“聚合状态”和“拆分状态”
调试信息
拆分状态
device = mijiaDevice(api, dev_name='吊灯', sleep_time=2)
print(device.on)
>>> RuntimeError: 获取属性 on 失败, 错误码: -704083036, 错误信息: 设备操作超时
device.on = True
>>> RuntimeError: 设置属性 on 失败, 错误码: -704083036, 错误信息: 设备操作超时
在导出的model info中是有on这个字段的:
lemesh.switch.sw4f01.json
聚合状态
device = mijiaDevice(api, dev_name='面板', sleep_time=2)
print(device.on)
>>> False # 输出的是面板中第一个灯的状态
device.on = True
>>> RuntimeError: 设置属性 on 失败, 错误码: 1, 错误信息: 未知错误
>>> # 此时面板中第一个灯被开启,但是报错
导出的model与拆分状态相同
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested