Skip to content

Commit

Permalink
feat(device): add deconz support for WXCJKG13LMLightController
Browse files Browse the repository at this point in the history
related to #117
  • Loading branch information
xaviml committed Sep 12, 2020
1 parent e3c1059 commit 450adcc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
40 changes: 40 additions & 0 deletions apps/controllerx/cx_devices/aqara.py
Expand Up @@ -199,26 +199,66 @@ def get_z2m_actions_mapping(self) -> TypeActionsMapping:
return {
"button_1_single": Light.OFF,
"button_1_double": Light.SYNC,
# "button_1_triple": "", # Nothing
# "button_1_hold": "", # Nothing
# "button_1_release": "", # Nothing
"button_2_single": Light.ON,
"button_2_double": Light.SYNC,
# "button_2_triple": "", # Nothing
# "button_2_hold": "", # Nothing
# "button_2_release": "", # Nothing
"button_3_single": Light.CLICK_BRIGHTNESS_DOWN,
"button_3_double": Light.ON_MIN_BRIGHTNESS,
# "button_3_triple": "", # Nothing
"button_3_hold": Light.HOLD_BRIGHTNESS_DOWN,
"button_3_release": Light.RELEASE,
"button_4_single": Light.CLICK_BRIGHTNESS_UP,
"button_4_double": Light.ON_FULL_BRIGHTNESS,
# "button_4_triple": "", # Nothing
"button_4_hold": Light.HOLD_BRIGHTNESS_UP,
"button_4_release": Light.RELEASE,
"button_5_single": Light.CLICK_COLOR_DOWN,
"button_5_double": Light.ON_MIN_COLOR_TEMP,
# "button_5_triple": "", # Nothing
"button_5_hold": Light.HOLD_COLOR_DOWN,
"button_5_release": Light.RELEASE,
"button_6_single": Light.CLICK_COLOR_UP,
"button_6_double": Light.ON_FULL_COLOR_TEMP,
# "button_6_triple": "", # Nothing
"button_6_hold": Light.HOLD_COLOR_UP,
"button_6_release": Light.RELEASE,
}

def get_deconz_actions_mapping(self) -> TypeActionsMapping:
return {
1002: Light.OFF,
1004: Light.SYNC,
# 1005: "", # Nothing
# 1001: "", # Nothing
# 1003: "", # Nothing
2002: Light.ON,
2004: Light.SYNC,
# 2005: "", # Nothing
# 2001: "", # Nothing
# 2003: "", # Nothing
3002: Light.CLICK_BRIGHTNESS_DOWN,
3004: Light.ON_MIN_BRIGHTNESS,
# 3005: "", # Nothing
3001: Light.HOLD_BRIGHTNESS_DOWN,
3003: Light.RELEASE,
4002: Light.CLICK_BRIGHTNESS_UP,
4004: Light.ON_FULL_BRIGHTNESS,
# 4005: "", # Nothing
4001: Light.HOLD_BRIGHTNESS_UP,
4003: Light.RELEASE,
5002: Light.CLICK_COLOR_DOWN,
5004: Light.ON_MIN_COLOR_TEMP,
# 5005: "", # Nothing
5001: Light.HOLD_COLOR_DOWN,
5003: Light.RELEASE,
6002: Light.CLICK_COLOR_UP,
6004: Light.ON_FULL_COLOR_TEMP,
# 6005: "", # Nothing
6001: Light.HOLD_COLOR_UP,
6003: Light.RELEASE,
}
35 changes: 34 additions & 1 deletion docs/_data/controllers/WXCJKG13LM.yml
Expand Up @@ -54,4 +54,37 @@ integrations:
- "button_6_double 🠖 Double click bottom right button"
- "button_6_triple 🠖 Double triple bottom right button"
- "button_6_hold 🠖 Hold bottom right button"
- "button_6_release 🠖 Release bottom right button"
- "button_6_release 🠖 Release bottom right button"
- name: deCONZ
codename: deconz
actions:
- "1002 🠖 Single click top left button"
- "1004 🠖 Double click top left button"
- "1005 🠖 Double triple top left button"
- "1001 🠖 Hold top left button"
- "1003 🠖 Release top left button"
- "2002 🠖 Single click top right button"
- "2004 🠖 Double click top right button"
- "2005 🠖 Double triple top right button"
- "2001 🠖 Hold top right button"
- "2003 🠖 Release top right button"
- "3002 🠖 Single click middle left button"
- "3004 🠖 Double click middle left button"
- "3005 🠖 Double triple middle left button"
- "3001 🠖 Hold middle left button"
- "3003 🠖 Release middle left button"
- "4002 🠖 Single click middle right button"
- "4004 🠖 Double click middle right button"
- "4005 🠖 Double triple middle right button"
- "4001 🠖 Hold middle right button"
- "4003 🠖 Release middle right button"
- "5002 🠖 Single click bottom left button"
- "5004 🠖 Double click bottom left button"
- "5005 🠖 Double triple bottom left button"
- "5001 🠖 Hold bottom left button"
- "5003 🠖 Release bottom left button"
- "6002 🠖 Single click bottom right button"
- "6004 🠖 Double click bottom right button"
- "6005 🠖 Double triple bottom right button"
- "6001 🠖 Hold bottom right button"
- "6003 🠖 Release bottom right button"

0 comments on commit 450adcc

Please sign in to comment.