Zooz ZEN72

This blueprint is for simplifying the scene configuration for the Zooz ZEN72 Dimmer Switch, for use with the Z-Wave JS Integration, listening to the zwave_js_value_notification used in release 2021.04+. It’s adapted directly from my ealier ZEN30 and ZEN27 blueprints.

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
  • Press and Hold Up Button
  • Press and 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. 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 ZEN72
  description: Automations helper for the Zooz ZEN72 Dimmer Switch using the
    Zwave JS integration.
  domain: automation
  input:
    zooz_zen72:
      name: Zooz ZEN72
      description: The ZEN72 Switch to interact with.
      selector:
        device:
          integration: zwave_js
          manufacturer: Zooz
          model: ZEN72
    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/full/max brightness."
      default: []
      selector:
        action: {}
    dimmer_up_2x:
      name: Top Paddle 2x
      description: "Action to run on dimmer upper paddle double tap.
      Default: Turn on dimmer switch to full/max/custom brightness."
      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_zen72

action:
  - variables:
      scene_id: "{{ trigger.event.data.label }}"
      attribute_id: "{{ trigger.event.data.value }}"
  - choose:
      - conditions: "{{ scene_id == 'Scene 001' }}"
        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 002' }}"
        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

*15/7/21 Edit: Uncommented Hold and Release actions after reports that they were disappearing during Blueprint import.

1 Like

@ziptbm, can you try this out, and let me know if I need to make any edits? I’m assuming the Zen72 follows the typical Zooz trigger.event.data.value conventions, but I can edit or switch to using the value_raw data if needed.

It seems to work just like the version I modified of your ZEN27 blueprint.

Only thing I haven’t figure out is incremental dimming a Hue bulb using the paddles. Should this blueprint be able to do that?

I commented out the 3x press, Hold, and Release functions in my blueprint. Did you un-comment the applicable lines before deploying?

I try to avoid smart bulbs whenever possible, and tend to find double taps easier/quicker than holds, but I did a quick test and it seems to work fine for me. What do your trace logs show?

(I don’t have any ZEN72 switches, so this was completed on a ZEN30, but should still be applicable.)
Screenshot from 2021-07-14 22-07-13

Alternatively, if you want to explicitly define dimming steps, you can set the dimming percentage by using the call service:
Screenshot from 2021-07-14 22-32-47

Screenshot from 2021-07-14 22-33-03

Interesting. It looks like for your ZEN27 and ZEN72 blueprints that the commented out lines for 3x press, Hold, and Release are all gone from the YAML presented to me through File Editor. I see in your code above those are hashed out, but they’re not even listed for me in my UI. I will try adding those back manually to see what happens.

I’m assuming you commented out 3x press due to the pair/unpair functionality. Why did you comment out Hold and Release?

I am using most of these switches with Hue bulbs, so I’ve disabled the physical control of the switch and I am instead having the blueprints adjust the Hue entity. It’s overkill, but the bulbs came with the house, so it didn’t make sense to swap them out. As a result, the Hue bulb groups aren’t shown as Devices, which is why I believe my only option is to use the Call Service action and then step brightness. I may need to group the Hue bulbs myself within HA to make those visible as devices.

Still a work in progress, but MUCH better now that the Scene 1 and 2 swap was figured out.

Local dimming, and the 20% night mode. If the commented lines are completely disappearing, I might uncomment at least the hold/release options.

I have a similar setup in the bedroom, where I have disabled local control for the relay output on a ZEN30 and use it to control multiple outlets on a ‘Tasmotized’ power strip.

Even if you group them together, I think you still have to use a call service to trigger a group in an automation.

The lines themselves for 3x, Hold, and Release did not import with the yaml file via the Blueprint import. The yaml just skipped them entirely, so there are no hashtags to remove. I had to manually insert the two lines for Hold, but have not added the others back yet. Weird…it’s like the blueprint import skips over importing those lines due to the hashtags or something.

No, I was saying that I would un-comment the applicable lines in the Blueprint, so that they would actually import correctly. HA has a tendency to remove commented lines (especially when switching between visual and YAML editing, as well as importing), which is very frustrating.

2 Likes

Got it. Well, thanks again for building this blueprint! It’s super helpful.

IOT_Ninja,

I imported your blueprint for both the zen30 and this one, the zen72. I can see both, and can create an automation based on the zen30 blueprint. For this one, the zen72, I can go through the motions of creating an automation, but once saved, the automation is not available or listed in automations.

I would normally think that I may have done something incorrectly, however your blueprint for the zen30 works as expected, and allows creating and viewing the new automation.

Odd. I just deleted and re-imported to test, and all seems to be working okay for me.

Is the newly created ‘ghost’ automation showing up in your /config/automations.yaml file?

They were in the automations.yaml. Chalk this up to user error. I left open multi-taps with no action specified. I was checking the home assistant logs and saw the error that basically said bad inputs. Null is not a valid input.

That said, I wanted to give thanks for your work with the Zooz switches. I just jumped on the Home Assistant bandwagon after the article in the Verge. I have a just a couple of them that are a ON/OFF and a Dimmer. I also got a Zen30 due to needing a third switch control in a double gang box.

Using your blueprint will open up a whole new world for me. I have a DC ceiling fan that I have replicated all the functions through logic, but with the new template for the ZEN32, I can have a single gang solution to actually give a physical presence of control. Put another way… the WAF (Wife Acceptance Factor) scored off the charts!

Thank you.

Awesome, good to hear! With the multi-click scene activations, it’s amazing how much functionality you can cram in a single gang now.

The Zooz store has some new sensors for sale at a reduced introductory price.

IT_Ninja,

I had to delete and import the blueprint again. Once I did that, then it performed as expected. I just wanted to leave this, in case anyone else runs across my issue of an initial import not quite working as expected. Simple fix, edit the automations.yaml to remove any “hidden” automations built off the blueprint, then delete and re-import the blueprint.

1 Like

I’m new to this. I have used your zen32 blueprint without any issues.
This zen72 is throwing Error: UndefinedError: ‘dict object’ has no attribute ‘event’.
I’ve searched and cannot find anything that helps.
Any idea what I’m doing wrong?

Thanks in advance for this and your other blueprints.

I was having similar issues with a Zooz Zen 77. For me - I was getting that same error when I ran the automation through the automation panel - clicking on ‘run actions’. Checking the trace screen would give me that same error. BUT. When I finally got off of my butt and ran it at the switch (ie. up click twice on the switch) it worked and the tracing was fine. ymmv

Did you ever resolve this? I am having the same issue. FWIW, I am triggering the event from the switch.

To all those having issues @millerstevew and @LarsenTech.

‘dict object’ has no attribute ‘event’ means that there is no ‘sensor’ attribute in the json payload.

Please post your actual automation yaml and action trace. What is showing up in the event log listening for “zwave_js_value_notification” events?

Just set this up and receiving same message. Automations yaml is here:

id: '1633828454852'
  alias: Master Bath Light
  description: ''
  use_blueprint:
    path: ZOOZ/ZEN72.yaml
    input:
      zooz_zen72: 86068a09a856d4f0439e590f7bde1f83
      dimmer_up_1x:
      - type: turn_on
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light
        brightness_pct: 100
      dimmer_up_2x:
      - type: turn_on
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light
        brightness_pct: 8
      dimmer_down_1x:
      - type: turn_off
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light

Here is the trace:

{
  "trace": {
    "last_step": "action/0",
    "run_id": "3",
    "state": "stopped",
    "script_execution": "error",
    "timestamp": {
      "start": "2021-10-10T16:13:54.914348+00:00",
      "finish": "2021-10-10T16:13:54.942768+00:00"
    },
    "domain": "automation",
    "item_id": "1633828454852",
    "error": "UndefinedError: 'dict object' has no attribute 'event'",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2021-10-10T16:13:54.914577+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.master_bath_light",
              "state": "on",
              "attributes": {
                "last_triggered": "2021-10-10T16:07:46.321695+00:00",
                "mode": "single",
                "current": 0,
                "id": "1633828454852",
                "friendly_name": "Master Bath Light"
              },
              "last_changed": "2021-10-10T16:07:40.998037+00:00",
              "last_updated": "2021-10-10T16:07:46.335960+00:00",
              "context": {
                "id": "af557e4b62593e7ef5dca8806f0fedca",
                "parent_id": "96e7c86f7faecefef1e3f51558578317",
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2021-10-10T16:13:54.917844+00:00",
          "changed_variables": {
            "context": {
              "id": "96d630d639f0ef037dfe51be2e67d0fc",
              "parent_id": "c26c521aae8a4233ed1502384d281d3f",
              "user_id": null
            }
          },
          "error": "UndefinedError: 'dict object' has no attribute 'event'"
        }
      ]
    },
    "config": {
      "mode": "single",
      "max_exceeded": "silent",
      "trigger": [
        {
          "platform": "event",
          "event_type": "zwave_js_value_notification",
          "event_data": {
            "command_class_name": "Central Scene",
            "device_id": "86068a09a856d4f0439e590f7bde1f83"
          }
        }
      ],
      "action": [
        {
          "variables": {
            "scene_id": "{{ trigger.event.data.label }}",
            "attribute_id": "{{ trigger.event.data.value }}"
          }
        },
        {
          "choose": [
            {
              "conditions": "{{ scene_id == 'Scene 001' }}",
              "sequence": [
                {
                  "choose": [
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed' }}",
                      "sequence": [
                        {
                          "type": "turn_on",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light",
                          "brightness_pct": 100
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed2x' }}",
                      "sequence": [
                        {
                          "type": "turn_on",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light",
                          "brightness_pct": 8
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed4x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed5x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyHeldDown' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyReleased' }}",
                      "sequence": []
                    }
                  ]
                }
              ]
            },
            {
              "conditions": "{{ scene_id == 'Scene 002' }}",
              "sequence": [
                {
                  "choose": [
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed' }}",
                      "sequence": [
                        {
                          "type": "turn_off",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light"
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed2x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed4x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed5x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyHeldDown' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyReleased' }}",
                      "sequence": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "id": "1633828454852",
      "alias": "Master Bath Light",
      "description": ""
    },
    "blueprint_inputs": {
      "id": "1633828454852",
      "alias": "Master Bath Light",
      "description": "",
      "use_blueprint": {
        "path": "ZOOZ/ZEN72.yaml",
        "input": {
          "zooz_zen72": "86068a09a856d4f0439e590f7bde1f83",
          "dimmer_up_1x": [
            {
              "type": "turn_on",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light",
              "brightness_pct": 100
            }
          ],
          "dimmer_up_2x": [
            {
              "type": "turn_on",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light",
              "brightness_pct": 8
            }
          ],
          "dimmer_down_1x": [
            {
              "type": "turn_off",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light"
            }
          ]
        }
      }
    },
    "context": {
      "id": "96d630d639f0ef037dfe51be2e67d0fc",
      "parent_id": "c26c521aae8a4233ed1502384d281d3f",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Master Bath Light",
      "message": "has been triggered",
      "source": null,
      "entity_id": "automation.master_bath_light",
      "context_id": "96d630d639f0ef037dfe51be2e67d0fc",
      "when": "2021-10-10T16:13:54.915086+00:00",
      "domain": "automation"
    }
  ]
}