Zooz ZEN27

This blueprint is for simplifying the scene configuration for the Zooz ZEN27 S2 Dimmer Switch, for use with the new Z-Wave JS Integration, listening to the zwave_js_value_notification used in release 2021.04+. It’s adapted directly from my very similar earlier ZEN30 Double Switch blueprint.

Each of the two ‘buttons’ on this switch has 7 different configurable scene options:

  • 1x, 2x, 3x, 4x, 5x Tap Up Button
  • 1x, 2x, 3x, 4x, 5x Tap Down Button
  • Hold Up Button
  • Hold Down Button
  • Release Up Button
  • Release Down Button

This blueprint aims to simply and condense all of the scene triggers into a single automation.

Note that a few of the options conflict with default configuration options, and have been commented out in the blueprint action area. You can remove the comment tags at your own risk to remap them.
For example, triple tapping enters the inclusion/exclusion modes, and press-and-hold manually adjusts the dimmer level. Single taps would also be important to leave as-is, unless you’re using smart bulbs and only want the switch to trigger them. Full info from Zooz here. I made notes on the scenes with default behaviors in the input area.

blueprint:
  name: Zooz ZEN27
  description: Automations helper for the Zooz ZEN27 S2 Dimmer Switch using the
    Zwave JS integration.
  domain: automation
  input:
    zooz_zen27:
      name: Zooz ZEN27
      description: The ZEN27 Switch to interact with.
      selector:
        device:
          integration: zwave_js
          manufacturer: Zooz
          model: ZEN27
    dimmer_up_1x:
      name: Top Paddle 1x
      description: "Action to run on dimmer upper paddle single tap.
      Default: Turn on dimmer switch load to last/custom brightness."
      default: []
      selector:
        action: {}
    dimmer_up_2x:
      name: Top Paddle 2x
      description: Action to run on dimmer upper paddle double tap.
      default: []
      selector:
        action: {}
    dimmer_up_3x:
      name: Top Paddle 3x
      description: "Action to run on dimmer upper paddle triple tap.
      Default: Enter inclusion/pairing mode."
      default: []
      selector:
        action: {}
    dimmer_up_4x:
      name: Top Paddle 4x
      description: Action to run on dimmer upper paddle quadruple tap.
      default: []
      selector:
        action: {}
    dimmer_up_5x:
      name: Top Paddle 5x
      description: Action to run on dimmer upper paddle quintuple tap.
      default: []
      selector:
        action: {}
    dimmer_up_hold:
      name: Top Paddle Hold
      description: "Action to run on dimmer upper paddle press-and-hold.
      Default: Increase dimmer brightness level."
      default: []
      selector:
        action: {}
    dimmer_up_release:
      name: Top Paddle Release
      description: Action to run on dimmer upper paddle release.
      default: []
      selector:
        action: {}

    dimmer_down_1x:
      name: Lower Paddle 1x
      description: "Action to run on dimmer lower paddle single tap.
      Default: Turn off dimmer switch load."
      default: []
      selector:
        action: {}
    dimmer_down_2x:
      name: Lower Paddle 2x
      description: Action to run on dimmer lower paddle double tap.
      default: []
      selector:
        action: {}
    dimmer_down_3x:
      name: Lower Paddle 3x
      description: "Action to run on dimmer lower paddle triple tap.
      Default: Enter exclusion/un-pairing mode."
      default: []
      selector:
        action: {}
    dimmer_down_4x:
      name: Lower Paddle 4x
      description: Action to run on dimmer lower paddle quadruple tap.
      default: []
      selector:
        action: {}
    dimmer_down_5x:
      name: Lower Paddle 5x
      description: Action to run on dimmer lower paddle quintuple tap.
      default: []
      selector:
        action: {}
    dimmer_down_hold:
      name: Bottom Paddle Hold
      description: "Action to run on dimmer lower paddle press-and-hold.
      Default: Decrease dimmer brightness level."
      default: []
      selector:
        action: {}
    dimmer_down_release:
      name: Bottom Paddle Release
      description: Action to run on dimmer lower paddle double tap.
      default: []
      selector:
        action: {}

mode: single
max_exceeded: silent

trigger:
  - platform: event
    event_type: zwave_js_value_notification
    event_data:
      command_class_name: Central Scene
      device_id: !input zooz_zen27

action:
  - variables:
      scene_id: "{{ trigger.event.data.label }}"
      attribute_id: "{{ trigger.event.data.value }}"
  - choose:
      - conditions: "{{ scene_id == 'Scene 002' }}"
        sequence:
          - choose:
              - conditions: "{{ attribute_id == 'KeyPressed' }}"
                sequence: !input dimmer_up_1x
              - conditions: "{{ attribute_id == 'KeyPressed2x' }}"
                sequence: !input dimmer_up_2x
              #- conditions: "{{ attribute_id == 'KeyPressed3x' }}"
                #sequence: !input dimmer_up_3x
              - conditions: "{{ attribute_id == 'KeyPressed4x' }}"
                sequence: !input dimmer_up_4x
              - conditions: "{{ attribute_id == 'KeyPressed5x' }}"
                sequence: !input dimmer_up_5x
              #- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
                #sequence: !input dimmer_up_hold
              #- conditions: "{{ attribute_id == 'KeyReleased' }}"
                #sequence: !input dimmer_up_release
      - conditions: "{{ scene_id == 'Scene 001' }}"
        sequence: 
          - choose:
              - conditions: "{{ attribute_id == 'KeyPressed' }}"
                sequence: !input dimmer_down_1x
              - conditions: "{{ attribute_id == 'KeyPressed2x' }}"
                sequence: !input dimmer_down_2x
              #- conditions: "{{ attribute_id == 'KeyPressed3x' }}"
                #sequence: !input dimmer_down_3x
              - conditions: "{{ attribute_id == 'KeyPressed4x' }}"
                sequence: !input dimmer_down_4x
              - conditions: "{{ attribute_id == 'KeyPressed5x' }}"
                sequence: !input dimmer_down_5x
              #- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
                #sequence: !input dimmer_down_hold
              #- conditions: "{{ attribute_id == 'KeyReleased' }}"
                #sequence: !input dimmer_down_release
3 Likes

Edit/Update: My switch is reporting Scene 1 events for the upper paddle, and Scene 2 events for the lower paddle. Waiting on a reply confirmation from Zooz support whether this is an isolated event or the documentation is inaccurate. Let me know if you have similar issues, and I can adjust the OP blueprint.

Turns out there was a batch of switches that had the Scenes reversed (top paddle is Scene 1, and bottom paddle is Scene 2) This automation should work for most, but if you’re having issues (like I was), check your Z-Wave logs to verify the Scene paddle bindings. Zooz will provide an updated firmware, or you can just switch the Scenes in the blueprint.

I’ve got some ZEN72s that I’m using with another blueprint and noticed that some of the expected up and down commands are reversed, so I’m thinking this batch also has the same issue you’re seeing with reversed scenes.

Did you update firmware or just rewrite your blueprint? If you swapped the scenes, could you share exactly which ones you swapped?

Also, if I wanted to adjust yours for ZEN77s, which should have the same advanced settings, do I just need to adjust the mentions from 27 to 77 so it can find those entities?

The ZEN72 should use Scene 1 on the upper paddle, and Scene 2 on the lower paddle, the opposite of what I have written in the Blueprint (and matching how my particular ZEN27 was shipped) Are you saying that you’re getting Scene 2 on the upper, and Scene 1 on the lower?

Aside from that, the ZEN72 does differ from the ZEN27 in a few other ways. Compare the two Scene/Attribute listings, and let me know if you need any help editing.
For example, comparing the ZEN72 and 27, it looks like Scenes 1 and 2 are swapped, as well as the tap-and-hold and release attributes across both scenes:

Rather than removing from the network, flashing, and adding back to the network, I just modified my Blueprint since it was easier, and Zooz didn’t really indicate any other changes in the firmware.

There’s another blueprint that I was trying that is supposed to have 2x taps on UP for 100% brightness, but I’m finding that works on 2x taps for DOWN instead, which makes me wonder if it’s because it’s written with the scenes swaps like you experienced. I’m still figuring this out and learning about how scenes and attributes work within Zwave.

Looks like I’m going to need to build a new blueprint that’s specific to the ZEN72, so maybe I can use this one as the basis for it. Appreciate the response.

The best way to verify the Scene and Attribute values for each button press, is to go to Developer Tools, and on the Events tab, listen to “zwave_js_value_notification”:
Screenshot from 2021-07-14 13-27-23

Then cycle through the button presses.

For my ZEN27, a double-tap on the lower paddles gives me this output, (obfuscating the home and device ids just in case):

    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 66,
        "home_id": ##########,
        "endpoint": 0,
        "device_id": "################################",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": "KeyPressed2x",
        "value_raw": 3
    }

From the above snippet, I would now know a double tap on the lower paddle would return a “label” of Scene 002 and “value” of KeyPressed2x.

From there, you can create or modify a blueprint to make sure you have the desired button mappings. My blueprint uses “label” and “value” as variables, scene_id: “{{ trigger.event.data.label }}” and attribute_id: “{{ trigger.event.data.value }}”, respectively, but you could probably use any of the property options or the value_raw just as easily.

I’m guessing you’re looking at @vypurr’s setup? I used that blueprint for the ZEN21, combined with @freshcoast’s blueprint for the Minimote, as a starting point to create my earlier ZEN30 blueprint, which I then modified here to use with ZEN27 switches. Personally, I like referencing the more human readable “value” instead of the “scene_data”. I find data like “KeyPressed” and “KeyPressed2x” easier to parse vs “7680” or “7860”, and are usually consistent across different Zooz models. (ie, the “attribute” value may be swapped from model to model, but the “KeyPressed**”, “dimmer_up/down_hold/release” typically are consistent.)

exactly. Used the ZEN21 blueprint with my ZEN72s, so it was doing the following:

  • 1x UP = toggle on/off
  • 2x DOWN = 100%

I just ran the tests on my unit and confirmed Scene 1 and 2 were reversed, so modified your Blueprint to swap those values and replaced all instances of 27 with 72. It seems to work, thank you!

Have you been able to figure out dimming smart lights via this blueprint? I’m using Hues, so tried to set Hold for up and down to adjust brights 10% either direction, but it doesn’t seem to do that.

Also, out of curiosity, how have you configured your lights using the blueprint?

1 Like

@IOT_Ninja do you have any suggestions for modifying this for on/off switches like the ZEN71?

I tried modifying this one and another for that specific variant, but it does not show those switches as options when I apply the blueprint. Clearly, I’m missing a detail.

The mfg and model lines should be the only part that affects what switches you can use with the blueprint.

Post your edited blueprint?

Yeah, I modified this blueprint and copied/modified your input section from your ZEN72 Blueprint, but it doesn’t show the ZEN71 devices I have in my system.

blueprint:
  name: Zooz Zen71 Template
  description: Create automations for Zooz Zen Switches using scenes
  source_url: https://github.com/willheineman/homeassistant/blob/d7cf7d971a941751efe1e20f6ed21889cd03c264/components/automation/blueprints/zooz_zen_blueprint_template.yaml
  domain: automation
  input:
    zooz_zen71:
      name: Zooz ZEN71
      description: The ZEN71 Switch to interact with.
      selector:
        device:
          integration: zwave_js
          manufacturer: Zooz
          model: ZEN71

    on_1x:
      name: Press On (1x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_2x:
      name: Press On (2x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_3x:
      name: Press On (3x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_4x:
      name: Press On (4x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_5x:
      name: Press On (5x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_held:
      name: Press On (held)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_1x:
      name: Press Off (1x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_2x:
      name: Press Off (2x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_3x:
      name: Press Off (3x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_4x:
      name: Press Off (4x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_5x:
      name: Press Off (5x)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_held:
      name: Press Off (held)
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    on_released:
      name: Release On
      description: Action to run on button press.
      default: []
      selector:
        action: {}
    off_released:
      name: Release Off
      description: Action to run on button press.
      default: []
      selector:
        action: {}

mode: single
max_exceeded: silent

variables:
  device_id: !input zooz_zen71
#   ozw_node_id: !input ozw_node_id

trigger:
  - platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: !input zooz_zen71

action:
  - variables:
      scene_id: "{{ trigger.event.data.scene_id }}"
      scene_data: "{{ trigger.event.data.scene_data }}"
  - choose:
    # Down 1x
    - conditions: "{{ scene_id == 1 and scene_data == 7680}}"
      sequence: !input off_1x
    # Up 1x
    - conditions: "{{ scene_id == 2 and scene_data == 7680}}"
      sequence: !input on_1x
    # Down 2x
    - conditions: "{{ scene_id == 1 and scene_data == 7860}}"
      sequence: !input off_2x
    # Up 2x
    - conditions: "{{ scene_id == 2 and scene_data == 7860}}"
      sequence: !input on_2x
    # Down 3x
    - conditions: "{{ scene_id == 1 and scene_data == 7920}}"
      sequence: !input off_3x
    # Up 3x
    - conditions: "{{ scene_id == 2 and scene_data == 7920}}"
      sequence: !input on_3x
    # Down 4x
    - conditions: "{{ scene_id == 1 and scene_data == 7980}}"
      sequence: !input off_4x
    # Up 4x
    - conditions: "{{ scene_id == 2 and scene_data == 7980}}"
      sequence: !input on_4x
    # Down 5x
    - conditions: "{{ scene_id == 1 and scene_data == 8040}}"
      sequence: !input off_5x
    # Up 5x
    - conditions: "{{ scene_id == 2 and scene_data == 8040}}"
      sequence: !input on_5x
    # Held Down
    - conditions: "{{ scene_id == 1 and scene_data == 7800}}"
      sequence: !input off_held
    # Held Up
    - conditions: "{{ scene_id == 2 and scene_data == 7800}}"
      sequence: !input on_held
    # Released Down
    - conditions: "{{ scene_id == 1 and scene_data == 7740}}"
      sequence: !input off_released
    # Released Up
    - conditions: "{{ scene_id == 2 and scene_data == 7740}}"
      sequence: !input on_released```

Device selection header looks okay, but that integration is using the older zwave.scene_activated event_type instead of the newer zwave_js_value_notification in release 2021.04 onward.

I’m trying to use the Zen27 blueprint, and running into an automation error?

Executed: June 12, 2022, 5:46:10 PM
Error: UndefinedError: 'dict object' has no attribute 'event'

variables:
  scene_id: '{{ trigger.event.data.label }}'
  attribute_id: '{{ trigger.event.data.value }}'

I’m brand new to HomeAssistant… but I’ve been running home automation for quite a while, just on another platform…

I suspect there a simple change to the python dictionary, but I haven’t been able to find any references to this specific error, that indicate what needs to be updated.

So I’d be happy to assist, and learn at the same time…

Have you confirmed that the Scene Control is enabled in your Z-Wave JS config? This was brought up in my similar ZEN72 thread here.

Have you confirmed that the Scene Control is enabled in your Z-Wave JS config? This was brought up in my similar ZEN72 thread here .

I just found that in a web search this morning, and it does work!

Thanks for pointing that out. Now I just need to get the Zoom XS Sensor up and running.

Does these blueprints work if you use zwave2mqtt?

I’m assuming you mean the Z-Wave JS to MQTT add-on, not the older, long deprecated Zwave2MQTT?
This BP is designed for use with the Z-Wave JS Integration, whether you use the stock/official Z-Wave JS or community Z-Wave JS to MQTT add-on. (I run the Z-Wave JS to MQTT with all the Zooz BPs I’ve posted.)

Yes you are correct, just picked up the Zooz S2 stick and was debating which add-on to use. Just wanted to confirm if it does work with Z-Wave JS to MQTT. Thanks!

Having the exact same issue. Doesnt seem to work through the blue print, but I was able to get my tuya devices to dim using a separate automation