diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index af04b3f7..65079483 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -26,8 +26,6 @@ PRERELEASE_NOTE ## :wrench: Refactor --> - +- [XYZ](https://BASE_URL/controllerx/controllers/HueSmartButton) - add Z2M support. [ #498 ] diff --git a/apps/controllerx/cx_devices/philips.py b/apps/controllerx/cx_devices/philips.py index 7b8c1097..e0a299d6 100644 --- a/apps/controllerx/cx_devices/philips.py +++ b/apps/controllerx/cx_devices/philips.py @@ -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