From ba79e97f1a3f279e0ed165182045c5d2d5e784c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B8=D0=B7=D0=B0=D1=80=D0=BE=D0=B2=20=D0=A0?= =?UTF-8?q?=D0=BE=D0=BC=D0=B0=D0=BD?= Date: Sat, 18 Dec 2021 16:41:00 +0300 Subject: [PATCH] removed hold actions, added right button action events --- zhaquirks/xiaomi/aqara/ctrl_neutral.py | 36 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/zhaquirks/xiaomi/aqara/ctrl_neutral.py b/zhaquirks/xiaomi/aqara/ctrl_neutral.py index 4182d662f9..28029dd5a7 100644 --- a/zhaquirks/xiaomi/aqara/ctrl_neutral.py +++ b/zhaquirks/xiaomi/aqara/ctrl_neutral.py @@ -27,18 +27,20 @@ COMMAND, COMMAND_ATTRIBUTE_UPDATED, COMMAND_DOUBLE, - COMMAND_HOLD, - COMMAND_RELEASE, + COMMAND_CLICK, DEVICE_TYPE, ENDPOINT_ID, ENDPOINTS, INPUT_CLUSTERS, + LEFT, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, + RIGHT, SKIP_CONFIGURATION, VALUE, ) + from zhaquirks.xiaomi import ( LUMI, BasicCluster, @@ -48,10 +50,7 @@ ) ATTRIBUTE_ON_OFF = "on_off" -DOUBLE = "double" -HOLD = "long press" PRESS_TYPES = {0: "long press", 1: "single", 2: "double"} -SINGLE = "single" STATUS_TYPE_ATTR = 0x0055 # decimal = 85 XIAOMI_CLUSTER_ID = 0xFFFF XIAOMI_DEVICE_TYPE = 0x5F01 @@ -73,7 +72,8 @@ class BasicClusterDecoupled(BasicCluster): # Known Options for 'decoupled_mode_