Skip to content

Commit

Permalink
Merge pull request #503 from xaviml/feat/hue-smart-button-z2m
Browse files Browse the repository at this point in the history
feat(device): add Z2M support to HueSmartButton controller
  • Loading branch information
xaviml authored Jun 5, 2022
2 parents bdbf6b4 + bcc9604 commit 3367265
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ PRERELEASE_NOTE
## :wrench: Refactor
-->

<!--
## :video_game: New devices

- [XYZ](https://xaviml.github.io/controllerx/controllers/XYZ) - add device with Z2M support. [ #123 ]
-->
- [XYZ](https://BASE_URL/controllerx/controllers/HueSmartButton) - add Z2M support. [ #498 ]
8 changes: 8 additions & 0 deletions apps/controllerx/cx_devices/philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ def get_deconz_actions_mapping(self) -> DefaultActionsMapping:


class HueSmartButtonLightController(LightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {
"on": Light.TOGGLE,
"off": Light.TOGGLE,
"hold": Light.HOLD_BRIGHTNESS_TOGGLE,
"release": Light.RELEASE,
}

def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
return {
# 1000: "", # Initial press
Expand Down

0 comments on commit 3367265

Please sign in to comment.