Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aqara cube fixes #1893

Merged
merged 2 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zhaquirks/xiaomi/aqara/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down
6 changes: 4 additions & 2 deletions zhaquirks/xiaomi/aqara/cube_aqgl01.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
)

ACTIVATED_FACE = "activated_face"
DEACTIVATED_FACE = "deactivated_face"
DESCRIPTION = "description"
DROP = "drop"
DROP_VALUE = 3
Expand Down Expand Up @@ -116,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",
}
Expand Down Expand Up @@ -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)
Expand Down