From 9e36ed93d727fec8164537a4d00195b675256839 Mon Sep 17 00:00:00 2001 From: Alex X Date: Sat, 6 Apr 2024 16:26:54 +0300 Subject: [PATCH] Add new ble model lemesh.remote.ts4 #1318 --- custom_components/xiaomi_gateway3/core/devices.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/custom_components/xiaomi_gateway3/core/devices.py b/custom_components/xiaomi_gateway3/core/devices.py index 51cf3515..64691249 100644 --- a/custom_components/xiaomi_gateway3/core/devices.py +++ b/custom_components/xiaomi_gateway3/core/devices.py @@ -1755,6 +1755,16 @@ MapConv("lock", "binary_sensor", mi="2.e.1020.p.3", map={1: STATE_LOCKED, 2: STATE_UNLOCK}), ], # "ttl": "25h" +}, { + 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 }, { 14523: ["PTX", "BLE Wireless Switch", "090615.remote.btsw1"], "spec": [