Skip to content

Commit

Permalink
feat(device): add deCONZ support for WXKG12LM xiaomi button
Browse files Browse the repository at this point in the history
related to #90
  • Loading branch information
xaviml committed Jun 18, 2020
1 parent 6678ed8 commit 1420629
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions apps/controllerx/devices/aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def get_z2m_actions_mapping(self) -> TypeActionsMapping:
"release": Light.RELEASE,
}

def get_deconz_actions_mapping(self) -> TypeActionsMapping:
return {
1002: Light.TOGGLE, # button_1_press
1004: Light.ON_FULL_BRIGHTNESS, # button_1_double_press
1006: Light.ON_MIN_BRIGHTNESS, # button_1_shake
1001: Light.HOLD_BRIGHTNESS_TOGGLE, # button_1_hold
1003: Light.RELEASE, # button_1_release_after_hold
}


class MFKZQ01LMLightController(LightController):
"""
Expand Down
10 changes: 9 additions & 1 deletion docs/_data/controllers/WXKG12LM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ integrations:
- "double 🠖 2 clicks"
- "shake 🠖 Shake the controller"
- "hold 🠖 Hold the button"
- "release 🠖 Release the button"
- "release 🠖 Release the button"
- name: deCONZ
codename: deconz
actions:
- "1002 🠖 1 click"
- "1004 🠖 2 clicks"
- "1006 🠖 Shake the controller"
- "1001 🠖 Hold the button"
- "1003 🠖 Release the button"

0 comments on commit 1420629

Please sign in to comment.