本帖最后由 mars.z 于 2024-4-7 16:00 编辑
找了一圈,发现成品的旋钮设备类型还是比较少,最近发现一个米家里面的旋钮
型号:情景无线旋钮开关K4 可通过gateway3 接入ha
4个小按钮,每个按钮都支持 单击、双击、长按
旋钮支持 单击、双击、长按,还有左旋、右旋、按住左旋、按住右旋
总计19个基础触发条件
缺点就是米家旋钮的通病旋转事件有上报间隔的限制,无法丝滑的那种调节,也不知道米家啥时候能解决这个问题
(已提交给gateway3作者,gateway3 版本v4.0.3版本已支持该旋钮,无需额外写converter)
另外附上,这个旋钮的 gateway3的 converter
{
14456: ["LeMesh", "Scenario wireless knob switch K4", "lemesh.remote.ts4"],
"spec": [
BaseConv("battery", "sensor", mi="4.p.1003"), # uint8
BaseConv("action", "sensor"),
MapConv("action", mi="5.e.1012.p.1", map={1: "knob_single", 2: BUTTON_1_SINGLE, 3: BUTTON_2_SINGLE, 4: BUTTON_3_SINGLE, 5: BUTTON_4_SINGLE, 6: "knob_increasing", 7: "knob_reduced", 8: "knob_hold_increasing", 9: "knob_hold_reduced"}),
MapConv("action", mi="5.e.1013.p.1", map={1: "knob_double", 2: BUTTON_1_DOUBLE, 3: BUTTON_2_DOUBLE, 4: BUTTON_3_DOUBLE, 5: BUTTON_4_DOUBLE}),
MapConv("action", mi="5.e.1014.p.1", map={1: "knob_hold", 2: BUTTON_1_HOLD, 3: BUTTON_2_HOLD, 4: BUTTON_3_HOLD, 5: BUTTON_4_HOLD}),
],
"ttl": "6h" # battery every 6 hours
}
|