diff --git a/apps/controllerx/cx_devices/ikea.py b/apps/controllerx/cx_devices/ikea.py index 1cf81e0b..7d9db101 100644 --- a/apps/controllerx/cx_devices/ikea.py +++ b/apps/controllerx/cx_devices/ikea.py @@ -505,14 +505,13 @@ def get_z2m_actions_mapping(self) -> DefaultActionsMapping: class W2049LightController(LightController): def get_z2m_actions_mapping(self) -> DefaultActionsMapping: return { - "brightness_up_click": Light.TOGGLE, - "brightness_down_click": Light.CLICK_BRIGHTNESS_DOWN, + "on": Light.ON, + "off": Light.OFF, "arrow_left_click": Light.CLICK_COLOR_DOWN, "arrow_right_click": Light.CLICK_COLOR_UP, - "brightness_up_hold": Light.HOLD_BRIGHTNESS_UP, - "brightness_up_release": Light.RELEASE, - "brightness_down_hold": Light.HOLD_BRIGHTNESS_DOWN, - "brightness_down_release": Light.RELEASE, + "brightness_move_up": Light.HOLD_BRIGHTNESS_UP, + "brightness_stop": Light.RELEASE, + "brightness_move_down": Light.HOLD_BRIGHTNESS_DOWN, "arrow_left_hold": Light.HOLD_COLOR_DOWN, "arrow_left_release": Light.RELEASE, "arrow_right_hold": Light.HOLD_COLOR_UP, diff --git a/docs/_data/controllers/W2049.yml b/docs/_data/controllers/W2049.yml index 3b2ce672..121ba4ce 100644 --- a/docs/_data/controllers/W2049.yml +++ b/docs/_data/controllers/W2049.yml @@ -1,12 +1,12 @@ name: W2049 (IKEA) -device_support: +device_support: - type: Light domain: light controller: W2049LightController delay: 350 mapping: - - "Click 🔆 → Toggle" - - "Click 🔅 → Dim down (1 step)" + - "Click 🔆 → Turn on" + - "Click 🔅 → Turn off" - "Click < → Color temp down / Left color wheel (1 step)" - "Click > → Color temp up / Right color wheel (1 step)" - "Hold 🔆 → Brighten up" @@ -17,15 +17,17 @@ integrations: - name: Zigbee2MQTT codename: z2m actions: - - "brightness_up_click → Click 🔆" - - "brightness_down_click → Click 🔅" + - '"on" → Click 🔆' + - '"off" → Click 🔅' - "arrow_left_click → Click <" - "arrow_right_click → Click >" - - "brightness_up_hold → Hold 🔆" - - "brightness_up_release → Release 🔆" - - "brightness_down_hold → Hold 🔅" - - "brightness_down_release → Release 🔅" + - "brightness_move_up → Hold 🔆" + - "brightness_move_down → Hold 🔅" + - "brightness_stop → Release 🔆/🔅" - "arrow_left_hold → Hold <" - "arrow_left_release → Release <" - "arrow_right_hold → Hold >" - "arrow_right_release → Release >" +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.