Control a Light with a Button on a Zooz ZEN32 Scene Controller

For use with a Zooz ZEN32 Scene Controller.

Lets you use one of the buttons on the controller mimicking the behavior of some of their dedicated light switches.

  • Tap button to toggle on/off
  • Hold button for night light
  • Double-tap for full brightness

I like to use this in the open area in my house to have the big button control a group of all lights while the smaller buttons can control individual ones.
I recommend using this in conjunction with my automation that sets the LED indicator on the buttons based on the state of your light entity:
Set the Indicator Light on a Zooz ZEN32 Scene Controller button to Match the State of a Light

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
GitHub Gist

blueprint:
  name: Control Light with Scene Controller
  description: For Zooz ZEN32. Toggle a light with a single press, set it to max brightness with double-tap, night-light mode with hold.
  domain: automation
  input:
    zooz_switch:
      name: Zooz Switch
      description: List of available Zooz ZEN32 switches.
      selector:
        device:
          filter:
              - integration: zwave_js
                manufacturer: Zooz
                model: ZEN32
              - integration: zwave_js
                manufacturer: Zooz
                model: "ZEN32 800LR"
    target_light:
      name: Light
      description: The light to link to button
      selector:
        target:
          entity:
            domain: light
    scene_button:
      name: Scene Button
      description: The button to link to light
      selector:
        select:
          mode: dropdown
          options:
            - label: Scene 5 (Big Button)
              value: '005'
            - label: Scene 1 (Top Left)
              value: '001'
            - label: Scene 2 (Top Right)
              value: '002'
            - label: Scene 3 (Bottom Left)
              value: '003'
            - label: Scene 4 (Bottom Right)
              value: '004'
    night_light_brightness:
      name: Night Light Brightness
      description: Brightness to set lights to when button is held (default 20%)
      default: 20
      selector:
        number:
          min: 0
          max: 100
          unit_of_measurement: "%"
mode: single
max_exceeded: silent
variables:
  controller_id: !input 'zooz_switch'
  light_id: !input 'target_light'
  button_id: !input 'scene_button'
  night_light_brightness: !input 'night_light_brightness'
trigger:
- platform: event
  event_type: zwave_js_value_notification
condition: '{{ trigger.event.data.device_id == controller_id and trigger.event.data.property_key_name == button_id }}'
action:
- variables:
    property_key_name: '{{ trigger.event.data.property_key_name }}'
    label: '{{ trigger.event.data.label }}'
    command_class_name: '{{ trigger.event.data.command_class_name }}'
    value: '{{ trigger.event.data.value }}'
- service: logbook.log
  data:
    name: 'Z-Wave JS'
    message: 'received event: {{ command_class_name }} - {{ value }} - {{ label }}'
- choose:
  - conditions: '{{ value == ''KeyPressed'' }}'
    sequence:
      - service: light.toggle
        data: {}
        target: !input 'target_light'
  - conditions: '{{ value == ''KeyPressed2x'' }}'
    sequence:
      - service: light.turn_on
        data:
          brightness_pct: 100
        target: !input 'target_light'
  - conditions: '{{ value == ''KeyHeldDown'' }}'
    sequence:
      - service: light.turn_on
        data:
          brightness_pct: '{{ night_light_brightness }}'
        target: !input 'target_light'
1 Like