From 9b9ec5400883413a6dcb9eb65a36a0589f72028e Mon Sep 17 00:00:00 2001 From: Travis Prosser Date: Sat, 5 Nov 2022 10:48:10 -0300 Subject: [PATCH 1/2] Add 'deactivated_face' to aqgl01 FLIP events --- zhaquirks/xiaomi/aqara/cube_aqgl01.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zhaquirks/xiaomi/aqara/cube_aqgl01.py b/zhaquirks/xiaomi/aqara/cube_aqgl01.py index f659588372..6d5a35f38a 100644 --- a/zhaquirks/xiaomi/aqara/cube_aqgl01.py +++ b/zhaquirks/xiaomi/aqara/cube_aqgl01.py @@ -38,6 +38,7 @@ ) ACTIVATED_FACE = "activated_face" +DEACTIVATED_FACE = "deactivated_face" DESCRIPTION = "description" DROP = "drop" DROP_VALUE = 3 @@ -180,6 +181,7 @@ def _update_attribute(self, attrid, value): event_args[FLIP_DEGREES] = 180 else: event_args[FLIP_DEGREES] = 90 + event_args[DEACTIVATED_FACE] = (value // 8) % 8 + 1 event_args[ACTIVATED_FACE] = int((value % 8) + 1) self.listener_event(ZHA_SEND_EVENT, action, event_args) From eebfd8f8ed404a880e48163f42817c52b8daf21d Mon Sep 17 00:00:00 2001 From: Travis Prosser Date: Sat, 5 Nov 2022 10:48:32 -0300 Subject: [PATCH 2/2] fix typos in aqara cube movement descriptions --- zhaquirks/xiaomi/aqara/cube.py | 4 ++-- zhaquirks/xiaomi/aqara/cube_aqgl01.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zhaquirks/xiaomi/aqara/cube.py b/zhaquirks/xiaomi/aqara/cube.py index e20d15c783..87458bb52d 100644 --- a/zhaquirks/xiaomi/aqara/cube.py +++ b/zhaquirks/xiaomi/aqara/cube.py @@ -121,13 +121,13 @@ SLIDE_1_VALUE: "aqara logo on top", SLIDE_2_VALUE: "aqara logo facing user rotated 90 degrees right", SLIDE_3_VALUE: "aqara logo facing user upside down", - SLIDE_4_VALUE: "arara logo on bottom", + SLIDE_4_VALUE: "aqara logo on bottom", SLIDE_5_VALUE: "aqara logo facing user rotated 90 degrees left", SLIDE_6_VALUE: "aqara logo facing user upright", KNOCK_1_VALUE: "aqara logo on top", KNOCK_2_VALUE: "aqara logo facing user rotated 90 degrees right", KNOCK_3_VALUE: "aqara logo facing user upside down", - KNOCK_4_VALUE: "arara logo on bottom", + KNOCK_4_VALUE: "aqara logo on bottom", KNOCK_5_VALUE: "aqara logo facing user rotated 90 degrees left", KNOCK_6_VALUE: "aqara logo facing user upright", } diff --git a/zhaquirks/xiaomi/aqara/cube_aqgl01.py b/zhaquirks/xiaomi/aqara/cube_aqgl01.py index 6d5a35f38a..4d3ec01ece 100644 --- a/zhaquirks/xiaomi/aqara/cube_aqgl01.py +++ b/zhaquirks/xiaomi/aqara/cube_aqgl01.py @@ -117,13 +117,13 @@ SLIDE_1_VALUE: "aqara logo on top", SLIDE_2_VALUE: "aqara logo facing user rotated 90 degrees right", SLIDE_3_VALUE: "aqara logo facing user upside down", - SLIDE_4_VALUE: "arara logo on bottom", + SLIDE_4_VALUE: "aqara logo on bottom", SLIDE_5_VALUE: "aqara logo facing user rotated 90 degrees left", SLIDE_6_VALUE: "aqara logo facing user upright", KNOCK_1_VALUE: "aqara logo on top", KNOCK_2_VALUE: "aqara logo facing user rotated 90 degrees right", KNOCK_3_VALUE: "aqara logo facing user upside down", - KNOCK_4_VALUE: "arara logo on bottom", + KNOCK_4_VALUE: "aqara logo on bottom", KNOCK_5_VALUE: "aqara logo facing user rotated 90 degrees left", KNOCK_6_VALUE: "aqara logo facing user upright", }