diff --git a/apps/controllerx/devices/philips.py b/apps/controllerx/devices/philips.py index d967ea5b..1bb8ce5a 100644 --- a/apps/controllerx/devices/philips.py +++ b/apps/controllerx/devices/philips.py @@ -39,3 +39,33 @@ def get_deconz_actions_mapping(self) -> TypeActionsMapping: 4001: Light.HOLD_COLOR_DOWN, 4003: Light.RELEASE, } + + +class Niko91004LightController(LightController): + def get_deconz_actions_mapping(self) -> TypeActionsMapping: + return { + 1000: Light.ON, # button_1_press + 1001: Light.SYNC, # button_1_hold + # 1002: "", # button_1_release + # 1003: "", # button_1_release_after_hold + 2000: Light.OFF, # button_2_press + 2001: Light.SYNC, # button_2_hold + # 2002: "", # button_2_release + # 2003: "", # button_2_release_after_hold + 3000: Light.ON_FULL_BRIGHTNESS, # button_3_press + 3001: Light.HOLD_BRIGHTNESS_UP, # button_3_hold + # 3002: "", # button_3_release + 3003: Light.RELEASE, # button_3_release_after_hold + 4000: Light.ON_MIN_BRIGHTNESS, # button_4_press + 4001: Light.HOLD_BRIGHTNESS_DOWN, # button_4_hold + # 4002: "", # button_4_release + 4003: Light.RELEASE, # button_4_release_after_hold + 5000: Light.ON_FULL_COLOR_TEMP, # button_1_3_press + 5001: Light.HOLD_COLOR_UP, # button_1_3_hold + # 5002: "", # button_1_3_release + 5003: Light.RELEASE, # button_1_3_release_after_hold + 6000: Light.ON_MIN_COLOR_TEMP, # button_2_4_press + 6001: Light.HOLD_COLOR_DOWN, # button_2_4_hold + # 6002: "", # button_2_4_release + 6003: Light.RELEASE, # button_2_4_release_after_hold + } diff --git a/docs/_data/controllers/Niko91004.yml b/docs/_data/controllers/Niko91004.yml new file mode 100644 index 00000000..33633614 --- /dev/null +++ b/docs/_data/controllers/Niko91004.yml @@ -0,0 +1,49 @@ +name: Niko dimmer switch for Hue system (Niko) +device_support: + - type: Light + domain: light + controller: Niko91004LightController + delay: 350 + mapping: + - "Click button 1 🠖 Turn on" + - "Hold button 1 🠖 Sync" + - "Click button 2 🠖 Turn off" + - "Hold button 2 🠖 Sync" + - "Click button 3 🠖 Full brightness" + - "Hold button 3 🠖 Brighten up" + - "Click button 4 🠖 Minimum brightness" + - "Hold button 4 🠖 Dim down" + - "Click button 1_3 🠖 Full color temp (if supported)" + - "Hold button 1_3 🠖 Color temp up / Right color wheel" + - "Click button 2_4 🠖 Minimum color temp (if supported)" + - "Hold button 2_4 🠖 Color temp down / Left color wheel" +integrations: + - name: deCONZ + codename: deconz + actions: + - "1000 🠖 button_1_press" + - "1001 🠖 button_1_hold" + - "1002 🠖 button_1_release" + - "1003 🠖 button_1_release_after_hold" + - "2000 🠖 button_2_press" + - "2001 🠖 button_2_hold" + - "2002 🠖 button_2_release" + - "2003 🠖 button_2_release_after_hold" + - "3000 🠖 button_3_press" + - "3001 🠖 button_3_hold" + - "3002 🠖 button_3_release" + - "3003 🠖 button_3_release_after_hold" + - "4000 🠖 button_4_press" + - "4001 🠖 button_4_hold" + - "4002 🠖 button_4_release" + - "4003 🠖 button_4_release_after_hold" + - "5000 🠖 button_1_3_press" + - "5001 🠖 button_1_3_hold" + - "5002 🠖 button_1_3_release" + - "5003 🠖 button_1_3_release_after_hold" + - "6000 🠖 button_2_4_press" + - "6001 🠖 button_2_4_hold" + - "6002 🠖 button_2_4_release" + - "6003 🠖 button_2_4_release_after_hold" +note: >- + Check the button mapping in here. diff --git a/docs/assets/img/Niko91004.jpeg b/docs/assets/img/Niko91004.jpeg new file mode 100644 index 00000000..fad0624e Binary files /dev/null and b/docs/assets/img/Niko91004.jpeg differ diff --git a/docs/controllers/Niko91004.md b/docs/controllers/Niko91004.md new file mode 100644 index 00000000..3af0ab2f --- /dev/null +++ b/docs/controllers/Niko91004.md @@ -0,0 +1,5 @@ +--- +layout: controller +title: Niko dimmer switch for Hue system (Niko) +device: Niko91004 +---