Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:xaviml/controllerx into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Oct 12, 2021
2 parents 3fbd156 + de944ba commit 43d0c1c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ PRERELEASE_NOTE

## :video_game: New devices

- [WXKG06LM](https://xaviml.github.io/controllerx/controllers/WXKG06LM) - add Z2M and deCONZ support
- [W2049](https://xaviml.github.io/controllerx/controllers/W2049) - add ZHA support @patrezp
14 changes: 14 additions & 0 deletions apps/controllerx/cx_devices/ikea.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,17 @@ def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
4001: Light.HOLD_COLOR_UP,
4003: Light.RELEASE,
}

def get_zha_actions_mapping(self) -> DefaultActionsMapping:
return {
"on": Light.ON,
"off": Light.OFF,
"press_257_13_0": Light.CLICK_COLOR_DOWN,
"press_256_13_0": Light.CLICK_COLOR_UP,
"move_with_on_off_0_83": Light.HOLD_BRIGHTNESS_UP,
"move_1_83": Light.HOLD_BRIGHTNESS_DOWN,
"hold_3329_0": Light.HOLD_COLOR_DOWN,
"hold_3328_0": Light.HOLD_COLOR_UP,
"stop": Light.RELEASE,
"release": Light.RELEASE,
}
13 changes: 13 additions & 0 deletions docs/_data/controllers/W2049.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ integrations:
- "3003 → Release <"
- "4001 → Hold >"
- "4003 → Release >"
- name: ZHA
codename: zha
actions:
- "on → Click 🔆"
- "off → Click 🔅"
- "press_257_13_0 → Click <"
- "press_256_13_0 → Click >"
- "move_with_on_off_0_83 → Hold 🔆"
- "move_1_83 → Hold 🔅"
- "hold_3329_0 → Hold <"
- "hold_3328_0 → Hold >"
- "stop → Release 🔆 or 🔅"
- "release → Release < or >"
note: >-
This controller fires "on" action when arrows are held as well as the hold arrow action.
So this means that when long pressing the arrows, the light(s) will turn on before changing the color.

0 comments on commit 43d0c1c

Please sign in to comment.